JeremyKendall\Password\Tests\Decorator\UpgradeDecoratorTest::setUp PHP Method

setUp() protected method

protected setUp ( )
    protected function setUp()
    {
        parent::setUp();
        $this->validationCallback = function ($credential, $passwordHash) {
            if (hash('sha512', $credential) === $passwordHash) {
                return true;
            }
            return false;
        };
        $this->decoratedValidator = $this->getMockBuilder('JeremyKendall\\Password\\PasswordValidatorInterface')->disableOriginalConstructor()->getMock();
        $this->decorator = new UpgradeDecorator($this->decoratedValidator, $this->validationCallback);
    }