aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/Wallabag/CoreBundle/Controller
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2017-04-20 14:58:20 +0200
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2017-04-20 15:17:02 +0200
commitfdd725f58cfe96d9bb9454d0347f6ff847fce69d (patch)
tree7f70e8d3b766d8a8ffc7cd807ca7a2a16d5f2bda /tests/Wallabag/CoreBundle/Controller
parent64f1d8f77a75332b731124c5ebab4bed7a512081 (diff)
downloadwallabag-fdd725f58cfe96d9bb9454d0347f6ff847fce69d.tar.gz
wallabag-fdd725f58cfe96d9bb9454d0347f6ff847fce69d.tar.zst
wallabag-fdd725f58cfe96d9bb9454d0347f6ff847fce69d.zip
Added notmatches operator for tagging rule
Diffstat (limited to 'tests/Wallabag/CoreBundle/Controller')
-rw-r--r--tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php6
-rw-r--r--tests/Wallabag/CoreBundle/Controller/ExportControllerTest.php2
-rw-r--r--tests/Wallabag/CoreBundle/Controller/TagControllerTest.php6
3 files changed, 7 insertions, 7 deletions
diff --git a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php
index d26a56f8..35438c83 100644
--- a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php
+++ b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php
@@ -270,7 +270,7 @@ class EntryControllerTest extends WallabagCoreTestCase
270 ->findOneByUrl($url); 270 ->findOneByUrl($url);
271 $tags = $entry->getTags(); 271 $tags = $entry->getTags();
272 272
273 $this->assertCount(1, $tags); 273 $this->assertCount(2, $tags);
274 $this->assertEquals('wallabag', $tags[0]->getLabel()); 274 $this->assertEquals('wallabag', $tags[0]->getLabel());
275 275
276 $em->remove($entry); 276 $em->remove($entry);
@@ -299,8 +299,8 @@ class EntryControllerTest extends WallabagCoreTestCase
299 299
300 $tags = $entry->getTags(); 300 $tags = $entry->getTags();
301 301
302 $this->assertCount(1, $tags); 302 $this->assertCount(2, $tags);
303 $this->assertEquals('wallabag', $tags[0]->getLabel()); 303 $this->assertEquals('wallabag', $tags[1]->getLabel());
304 304
305 $em->remove($entry); 305 $em->remove($entry);
306 $em->flush(); 306 $em->flush();
diff --git a/tests/Wallabag/CoreBundle/Controller/ExportControllerTest.php b/tests/Wallabag/CoreBundle/Controller/ExportControllerTest.php
index 32a18e26..1b8ecc49 100644
--- a/tests/Wallabag/CoreBundle/Controller/ExportControllerTest.php
+++ b/tests/Wallabag/CoreBundle/Controller/ExportControllerTest.php
@@ -241,7 +241,7 @@ class ExportControllerTest extends WallabagCoreTestCase
241 $this->assertEquals($contentInDB->getLanguage(), $content[0]['language']); 241 $this->assertEquals($contentInDB->getLanguage(), $content[0]['language']);
242 $this->assertEquals($contentInDB->getReadingtime(), $content[0]['reading_time']); 242 $this->assertEquals($contentInDB->getReadingtime(), $content[0]['reading_time']);
243 $this->assertEquals($contentInDB->getDomainname(), $content[0]['domain_name']); 243 $this->assertEquals($contentInDB->getDomainname(), $content[0]['domain_name']);
244 $this->assertEquals(['foo bar', 'baz'], $content[0]['tags']); 244 $this->assertEquals(['foo bar', 'baz', 'foot'], $content[0]['tags']);
245 } 245 }
246 246
247 public function testXmlExport() 247 public function testXmlExport()
diff --git a/tests/Wallabag/CoreBundle/Controller/TagControllerTest.php b/tests/Wallabag/CoreBundle/Controller/TagControllerTest.php
index fa1a3539..c3b22dcd 100644
--- a/tests/Wallabag/CoreBundle/Controller/TagControllerTest.php
+++ b/tests/Wallabag/CoreBundle/Controller/TagControllerTest.php
@@ -46,7 +46,7 @@ class TagControllerTest extends WallabagCoreTestCase
46 ->getRepository('WallabagCoreBundle:Entry') 46 ->getRepository('WallabagCoreBundle:Entry')
47 ->findByUrlAndUserId('http://0.0.0.0/entry1', $this->getLoggedInUserId()); 47 ->findByUrlAndUserId('http://0.0.0.0/entry1', $this->getLoggedInUserId());
48 48
49 $this->assertEquals(3, count($entry->getTags())); 49 $this->assertEquals(4, count($entry->getTags()));
50 50
51 // tag already exists and already assigned 51 // tag already exists and already assigned
52 $client->submit($form, $data); 52 $client->submit($form, $data);
@@ -57,7 +57,7 @@ class TagControllerTest extends WallabagCoreTestCase
57 ->getRepository('WallabagCoreBundle:Entry') 57 ->getRepository('WallabagCoreBundle:Entry')
58 ->find($entry->getId()); 58 ->find($entry->getId());
59 59
60 $this->assertEquals(3, count($newEntry->getTags())); 60 $this->assertEquals(4, count($newEntry->getTags()));
61 61
62 // tag already exists but still not assigned to this entry 62 // tag already exists but still not assigned to this entry
63 $data = [ 63 $data = [
@@ -72,7 +72,7 @@ class TagControllerTest extends WallabagCoreTestCase
72 ->getRepository('WallabagCoreBundle:Entry') 72 ->getRepository('WallabagCoreBundle:Entry')
73 ->find($entry->getId()); 73 ->find($entry->getId());
74 74
75 $this->assertEquals(3, count($newEntry->getTags())); 75 $this->assertEquals(4, count($newEntry->getTags()));
76 } 76 }
77 77
78 public function testAddMultipleTagToEntry() 78 public function testAddMultipleTagToEntry()