FOC\Authenticate\Auth\Test\TestCase\Auth\CookieAuthenticateTest::testAuthenticate PHP Метод

testAuthenticate() публичный Метод

test authenticate email or username
public testAuthenticate ( ) : void
Результат void
    public function testAuthenticate()
    {
        $expected = ['id' => 1, 'user_name' => 'mariano', 'email' => '[email protected]', 'token' => '12345', 'created' => new Time('2007-03-17 01:16:23'), 'updated' => new Time('2007-03-17 01:18:31')];
        $result = $this->auth->authenticate($this->request, $this->response);
        $this->assertFalse($result);
        $this->Registry->Cookie->write('RememberMe', ['user_name' => 'mariano', 'password' => 'password']);
        $result = $this->auth->authenticate($this->request, $this->response);
        $this->assertEquals($expected, $result);
    }