X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2FWallabag%2FCoreBundle%2FController%2FRssControllerTest.php;h=afa906210f0edf2945f5772b33c2316be13b7435;hb=1e0d8ad7b728f6fb2cd886526b0fb84ef803e84f;hp=c6ca49374cd002086226fa66714102b7992d462e;hpb=ed5e175c200501e2ee115ff5d8cd3f3ea47a1c2f;p=github%2Fwallabag%2Fwallabag.git diff --git a/tests/Wallabag/CoreBundle/Controller/RssControllerTest.php b/tests/Wallabag/CoreBundle/Controller/RssControllerTest.php index c6ca4937..afa90621 100644 --- a/tests/Wallabag/CoreBundle/Controller/RssControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/RssControllerTest.php @@ -11,7 +11,7 @@ class RssControllerTest extends WallabagCoreTestCase $doc = new \DOMDocument(); $doc->loadXML($xml); - $xpath = new \DOMXpath($doc); + $xpath = new \DOMXPath($doc); if (null === $nb) { $this->assertGreaterThan(0, $xpath->query('//item')->length); @@ -61,6 +61,9 @@ class RssControllerTest extends WallabagCoreTestCase [ '/wallace/YZIOAUZIAO/archives.xml', ], + [ + '/wallace/YZIOAUZIAO/all.xml', + ], ]; } @@ -141,6 +144,28 @@ class RssControllerTest extends WallabagCoreTestCase $this->validateDom($client->getResponse()->getContent(), 'archive', 'archive'); } + public function testAll() + { + $client = $this->getClient(); + $em = $client->getContainer()->get('doctrine.orm.entity_manager'); + $user = $em + ->getRepository('WallabagUserBundle:User') + ->findOneByUsername('admin'); + + $config = $user->getConfig(); + $config->setRssToken('SUPERTOKEN'); + $config->setRssLimit(null); + $em->persist($config); + $em->flush(); + + $client = $this->getClient(); + $client->request('GET', '/admin/SUPERTOKEN/all.xml'); + + $this->assertSame(200, $client->getResponse()->getStatusCode()); + + $this->validateDom($client->getResponse()->getContent(), 'all', 'all'); + } + public function testPagination() { $client = $this->getClient();