Elcodi\Component\User\Tests\UnitTests\Entity\Abstracts\AbstractUserTest::testSetPasswordWithException PHP Method

testSetPasswordWithException() public method

Test set password method with exception.
public testSetPasswordWithException ( $value )
    public function testSetPasswordWithException($value)
    {
        $user = $this->getMockForAbstractClass('Elcodi\\Component\\User\\Entity\\Abstracts\\AbstractUser');
        $user->setPassword('00000');
        try {
            $user->setPassword($value);
            $this->fail('AbstractUser::setPassword($password) should contain a null value or a string');
        } catch (InvalidPasswordException $e) {
            //Silent pass
        }
    }