コード例 #1
0
 public function testWriteNull()
 {
     $response = new Response();
     $this->service->writeNull($response);
     $this->assertTrue($response->getHeaders()->has('SetCookie'));
     $cookie = $response->getHeaders()->get('SetCookie')->current();
     $this->assertInstanceOf('Zend\\Http\\Header\\SetCookie', $cookie);
     $this->assertEquals('JwPersistentUser', $cookie->getName());
     $this->assertDateTimeEquals(new \DateTime('-1 hour'), new \DateTime($cookie->getExpires()));
     $this->assertEquals('/', $cookie->getPath());
 }