mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 07:23:13 +00:00
Fix tests
This commit is contained in:
@@ -26,7 +26,7 @@ class OverviewTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
|
|||||||
$this->assertNotFoundResponse(self::$DI['client']->getResponse());
|
$this->assertNotFoundResponse(self::$DI['client']->getResponse());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testEtag()
|
public function testLastModified()
|
||||||
{
|
{
|
||||||
$tmp = tempnam(sys_get_temp_dir(), 'testEtag');
|
$tmp = tempnam(sys_get_temp_dir(), 'testEtag');
|
||||||
copy(__DIR__ . '/../../../../files/cestlafete.jpg', $tmp);
|
copy(__DIR__ . '/../../../../files/cestlafete.jpg', $tmp);
|
||||||
@@ -43,7 +43,6 @@ class OverviewTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
|
|||||||
|
|
||||||
/* @var $response \Symfony\Component\HttpFoundation\Response */
|
/* @var $response \Symfony\Component\HttpFoundation\Response */
|
||||||
$this->assertTrue($response->isOk());
|
$this->assertTrue($response->isOk());
|
||||||
$this->assertNotNull($response->getEtag());
|
|
||||||
$this->assertInstanceOf('DateTime', $response->getLastModified());
|
$this->assertInstanceOf('DateTime', $response->getLastModified());
|
||||||
$this->assertEquals(0, $response->getMaxAge());
|
$this->assertEquals(0, $response->getMaxAge());
|
||||||
$this->assertEquals(0, $response->getTtl());
|
$this->assertEquals(0, $response->getTtl());
|
||||||
|
@@ -37,7 +37,6 @@ class ServeFileResponseFactoryTest extends \PhraseanetWebTestCaseAbstract
|
|||||||
$response = $this->factory->deliverFile(__DIR__ . '/../../../../files/cestlafete.jpg', 'hello', 'attachment', 'application/json', 23456);
|
$response = $this->factory->deliverFile(__DIR__ . '/../../../../files/cestlafete.jpg', 'hello', 'attachment', 'application/json', 23456);
|
||||||
|
|
||||||
$this->assertEquals(23456, $response->getMaxAge());
|
$this->assertEquals(23456, $response->getMaxAge());
|
||||||
$this->assertTrue($response->headers->getCacheControlDirective('private'));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testDeliverFileWithFilename()
|
public function testDeliverFileWithFilename()
|
||||||
|
Reference in New Issue
Block a user