/** * Tests authentication failure due to a wrong cookie path. * * @covers empire\framework\login\SecurePersistentLoginMethod::authenticate */ public function testAuthenticateCookiePathFail() { $gid = '58d93d649ffffffff5331ad0219ea200'; $storage = new JsonLoginStorage(__DIR__ . DIRECTORY_SEPARATOR . 'login.json', new Md5HashFunction(), 100, 'mykey'); $transceiver = new SecureCookieTransceiver(self::$cryptoFactory->getHashFunction('Sha256'), self::$cryptoFactory->getHashFunction('Sha256'), self::$cryptoFactory->getSymmetricCypher('Aes256'), 'secret key', new GID(), 'session id', $gid); $method = new SecurePersistentLoginMethod($storage, $transceiver); $method->setCookiePath('invalid path'); $this->remoteCall('login', $method, $gid); $this->assertNull($this->remoteCall('authenticate', $method)); }