aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/Wallabag/ApiBundle/Controller
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Wallabag/ApiBundle/Controller')
-rw-r--r--tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php26
1 files changed, 13 insertions, 13 deletions
diff --git a/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php b/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php
index 638e8bcd..19fb5170 100644
--- a/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php
+++ b/tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php
@@ -298,7 +298,7 @@ class EntryRestControllerTest extends WallabagApiTestCase
298 $entry = $this->client->getContainer() 298 $entry = $this->client->getContainer()
299 ->get('doctrine.orm.entity_manager') 299 ->get('doctrine.orm.entity_manager')
300 ->getRepository('WallabagCoreBundle:Entry') 300 ->getRepository('WallabagCoreBundle:Entry')
301 ->findOneByUser(1); 301 ->findOneByUser(1, ['id' => 'asc']);
302 302
303 if (!$entry) { 303 if (!$entry) {
304 $this->markTestSkipped('No content found in db.'); 304 $this->markTestSkipped('No content found in db.');
@@ -719,15 +719,15 @@ class EntryRestControllerTest extends WallabagApiTestCase
719 { 719 {
720 $entry = $this->client->getContainer()->get('doctrine.orm.entity_manager') 720 $entry = $this->client->getContainer()->get('doctrine.orm.entity_manager')
721 ->getRepository('WallabagCoreBundle:Entry') 721 ->getRepository('WallabagCoreBundle:Entry')
722 ->findByUrlAndUserId('http://0.0.0.0/entry2', 1); 722 ->findByUrlAndUserId('http://0.0.0.0/entry4', 1);
723 723
724 $tags = $entry->getTags(); 724 $tags = $entry->getTags();
725 725
726 $this->assertCount(4, $tags); 726 $this->assertCount(2, $tags);
727 727
728 $list = [ 728 $list = [
729 [ 729 [
730 'url' => 'http://0.0.0.0/entry2', 730 'url' => 'http://0.0.0.0/entry4',
731 'tags' => 'new tag 1, new tag 2', 731 'tags' => 'new tag 1, new tag 2',
732 ], 732 ],
733 ]; 733 ];
@@ -739,29 +739,29 @@ class EntryRestControllerTest extends WallabagApiTestCase
739 $content = json_decode($this->client->getResponse()->getContent(), true); 739 $content = json_decode($this->client->getResponse()->getContent(), true);
740 740
741 $this->assertInternalType('int', $content[0]['entry']); 741 $this->assertInternalType('int', $content[0]['entry']);
742 $this->assertEquals('http://0.0.0.0/entry2', $content[0]['url']); 742 $this->assertEquals('http://0.0.0.0/entry4', $content[0]['url']);
743 743
744 $entry = $this->client->getContainer()->get('doctrine.orm.entity_manager') 744 $entry = $this->client->getContainer()->get('doctrine.orm.entity_manager')
745 ->getRepository('WallabagCoreBundle:Entry') 745 ->getRepository('WallabagCoreBundle:Entry')
746 ->findByUrlAndUserId('http://0.0.0.0/entry2', 1); 746 ->findByUrlAndUserId('http://0.0.0.0/entry4', 1);
747 747
748 $tags = $entry->getTags(); 748 $tags = $entry->getTags();
749 $this->assertCount(6, $tags); 749 $this->assertCount(4, $tags);
750 } 750 }
751 751
752 public function testDeleteEntriesTagsListAction() 752 public function testDeleteEntriesTagsListAction()
753 { 753 {
754 $entry = $this->client->getContainer()->get('doctrine.orm.entity_manager') 754 $entry = $this->client->getContainer()->get('doctrine.orm.entity_manager')
755 ->getRepository('WallabagCoreBundle:Entry') 755 ->getRepository('WallabagCoreBundle:Entry')
756 ->findByUrlAndUserId('http://0.0.0.0/entry2', 1); 756 ->findByUrlAndUserId('http://0.0.0.0/entry4', 1);
757 757
758 $tags = $entry->getTags(); 758 $tags = $entry->getTags();
759 759
760 $this->assertCount(6, $tags); 760 $this->assertCount(4, $tags);
761 761
762 $list = [ 762 $list = [
763 [ 763 [
764 'url' => 'http://0.0.0.0/entry2', 764 'url' => 'http://0.0.0.0/entry4',
765 'tags' => 'new tag 1, new tag 2', 765 'tags' => 'new tag 1, new tag 2',
766 ], 766 ],
767 ]; 767 ];
@@ -773,13 +773,13 @@ class EntryRestControllerTest extends WallabagApiTestCase
773 $content = json_decode($this->client->getResponse()->getContent(), true); 773 $content = json_decode($this->client->getResponse()->getContent(), true);
774 774
775 $this->assertInternalType('int', $content[0]['entry']); 775 $this->assertInternalType('int', $content[0]['entry']);
776 $this->assertEquals('http://0.0.0.0/entry2', $content[0]['url']); 776 $this->assertEquals('http://0.0.0.0/entry4', $content[0]['url']);
777 777
778 $entry = $this->client->getContainer()->get('doctrine.orm.entity_manager') 778 $entry = $this->client->getContainer()->get('doctrine.orm.entity_manager')
779 ->getRepository('WallabagCoreBundle:Entry') 779 ->getRepository('WallabagCoreBundle:Entry')
780 ->findByUrlAndUserId('http://0.0.0.0/entry2', 1); 780 ->findByUrlAndUserId('http://0.0.0.0/entry4', 1);
781 781
782 $tags = $entry->getTags(); 782 $tags = $entry->getTags();
783 $this->assertCount(4, $tags); 783 $this->assertCount(2, $tags);
784 } 784 }
785} 785}