Ejemplo n.º 1
0
	public function testLogin () {
		$user = new User;
		$user->setUsername("test");
		$user->setPassword("test");
		
		$this->userManager->createUser($user);
		PartKeepr::getEM()->flush();
		
		$user2 = new User;
		$user2->setRawUsername("2test");
		$user2->setPassword("test");
		
		/* User shouldn't be able to login, even if we cut numbers and special chars from usernames */
		$this->setExpectedException("de\RaumZeitLabor\PartKeepr\Auth\Exceptions\InvalidLoginDataException");
		$this->userManager->authenticate($user2);
		
	}