mirror of
				https://github.com/kevinveenbirkenbach/infinito.git
				synced 2025-10-31 09:19:08 +00:00 
			
		
		
		
	Implemented tests for user
This commit is contained in:
		
							
								
								
									
										38
									
								
								application/tests/unit/Entity/UserTest.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								application/tests/unit/Entity/UserTest.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,38 @@ | ||||
| <?php | ||||
| namespace tests\unit\Entity; | ||||
|  | ||||
| use PHPUnit\Framework\TestCase; | ||||
| use App\Entity\User; | ||||
|  | ||||
| /** | ||||
|  * | ||||
|  * @author kevinfrantz | ||||
|  *         | ||||
|  */ | ||||
| class UserTest extends TestCase | ||||
| { | ||||
|     const PASSWORD = '12345678'; | ||||
|      | ||||
|     const USERNAME = 'tester'; | ||||
|      | ||||
|     /** | ||||
|      *  | ||||
|      * @var User | ||||
|      */ | ||||
|     protected $user; | ||||
|      | ||||
|     public function setUp():void{ | ||||
|         $this->user = new User(); | ||||
|         $this->user->setPassword(self::PASSWORD); | ||||
|         $this->user->setUsername(self::USERNAME); | ||||
|     } | ||||
|      | ||||
|     public function testUsername():void{ | ||||
|         $this->assertEquals(self::USERNAME,$this->user->getUsername()); | ||||
|     } | ||||
|      | ||||
|     public function testPassword():void{ | ||||
|         $this->assertEquals(self::PASSWORD,$this->user->getPassword()); | ||||
|     } | ||||
| } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user