diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php | 3 | ||||
-rw-r--r-- | tests/Wallabag/CoreBundle/Helper/ContentProxyTest.php | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php index c6a523e3..4ac4548b 100644 --- a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php | |||
@@ -137,6 +137,8 @@ class EntryControllerTest extends WallabagCoreTestCase | |||
137 | $this->logInAs('admin'); | 137 | $this->logInAs('admin'); |
138 | $client = $this->getClient(); | 138 | $client = $this->getClient(); |
139 | 139 | ||
140 | $client->getContainer()->get('craue_config')->set('store_article_headers', 1); | ||
141 | |||
140 | $crawler = $client->request('GET', '/new'); | 142 | $crawler = $client->request('GET', '/new'); |
141 | 143 | ||
142 | $this->assertSame(200, $client->getResponse()->getStatusCode()); | 144 | $this->assertSame(200, $client->getResponse()->getStatusCode()); |
@@ -165,6 +167,7 @@ class EntryControllerTest extends WallabagCoreTestCase | |||
165 | $this->assertSame('2015-03-28 11:43:19', $content->getPublishedAt()->format('Y-m-d H:i:s')); | 167 | $this->assertSame('2015-03-28 11:43:19', $content->getPublishedAt()->format('Y-m-d H:i:s')); |
166 | $this->assertSame('Morgane Tual', $author[0]); | 168 | $this->assertSame('Morgane Tual', $author[0]); |
167 | $this->assertArrayHasKey('x-varnish1', $content->getHeaders()); | 169 | $this->assertArrayHasKey('x-varnish1', $content->getHeaders()); |
170 | $client->getContainer()->get('craue_config')->set('store_article_headers', 0); | ||
168 | } | 171 | } |
169 | 172 | ||
170 | public function testPostWithMultipleAuthors() | 173 | public function testPostWithMultipleAuthors() |
diff --git a/tests/Wallabag/CoreBundle/Helper/ContentProxyTest.php b/tests/Wallabag/CoreBundle/Helper/ContentProxyTest.php index 0731a0c0..5c99e461 100644 --- a/tests/Wallabag/CoreBundle/Helper/ContentProxyTest.php +++ b/tests/Wallabag/CoreBundle/Helper/ContentProxyTest.php | |||
@@ -311,7 +311,7 @@ class ContentProxyTest extends \PHPUnit_Framework_TestCase | |||
311 | $tagger->expects($this->once()) | 311 | $tagger->expects($this->once()) |
312 | ->method('tag'); | 312 | ->method('tag'); |
313 | 313 | ||
314 | $proxy = new ContentProxy((new Graby()), $tagger, $this->getValidator(), $this->getLogger(), $this->fetchingErrorMessage); | 314 | $proxy = new ContentProxy((new Graby()), $tagger, $this->getValidator(), $this->getLogger(), $this->fetchingErrorMessage, true); |
315 | $entry = new Entry(new User()); | 315 | $entry = new Entry(new User()); |
316 | $proxy->updateEntry( | 316 | $proxy->updateEntry( |
317 | $entry, | 317 | $entry, |
@@ -341,6 +341,7 @@ class ContentProxyTest extends \PHPUnit_Framework_TestCase | |||
341 | $this->assertContains('Jeremy', $entry->getPublishedBy()); | 341 | $this->assertContains('Jeremy', $entry->getPublishedBy()); |
342 | $this->assertContains('Nico', $entry->getPublishedBy()); | 342 | $this->assertContains('Nico', $entry->getPublishedBy()); |
343 | $this->assertContains('Thomas', $entry->getPublishedBy()); | 343 | $this->assertContains('Thomas', $entry->getPublishedBy()); |
344 | $this->assertNotNull($entry->getHeaders(), 'Headers are stored, so value is not null'); | ||
344 | $this->assertContains('no-cache', $entry->getHeaders()); | 345 | $this->assertContains('no-cache', $entry->getHeaders()); |
345 | } | 346 | } |
346 | 347 | ||