X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2FWallabag%2FCoreBundle%2FController%2FTagControllerTest.php;h=768f4c0789d5ef733105c0d8a15e03581440ab8f;hb=2a1ceb67b4400f46f4d3067e887ff54aa906f0a2;hp=be25a8b5e1c91863947795f799417e248e15b81c;hpb=f808b01692a835673f328d7221ba8c212caa9b61;p=github%2Fwallabag%2Fwallabag.git diff --git a/tests/Wallabag/CoreBundle/Controller/TagControllerTest.php b/tests/Wallabag/CoreBundle/Controller/TagControllerTest.php index be25a8b5..768f4c07 100644 --- a/tests/Wallabag/CoreBundle/Controller/TagControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/TagControllerTest.php @@ -9,6 +9,7 @@ use Wallabag\CoreBundle\Entity\Tag; class TagControllerTest extends WallabagCoreTestCase { public $tagName = 'opensource'; + public $caseTagName = 'OpenSource'; public function testList() { @@ -36,7 +37,7 @@ class TagControllerTest extends WallabagCoreTestCase $form = $crawler->filter('form[name=tag]')->form(); $data = [ - 'tag[label]' => $this->tagName, + 'tag[label]' => $this->caseTagName, ]; $client->submit($form, $data); @@ -45,6 +46,7 @@ class TagControllerTest extends WallabagCoreTestCase // be sure to reload the entry $entry = $this->getEntityManager()->getRepository(Entry::class)->find($entry->getId()); $this->assertCount(1, $entry->getTags()); + $this->assertContains($this->tagName, $entry->getTags()); // tag already exists and already assigned $client->submit($form, $data); @@ -80,7 +82,7 @@ class TagControllerTest extends WallabagCoreTestCase $form = $crawler->filter('form[name=tag]')->form(); $data = [ - 'tag[label]' => 'foo2, bar2', + 'tag[label]' => 'foo2, Bar2', ]; $client->submit($form, $data); @@ -96,7 +98,7 @@ class TagControllerTest extends WallabagCoreTestCase $tags[$key] = $tag->getLabel(); } - $this->assertGreaterThanOrEqual(2, count($tags)); + $this->assertGreaterThanOrEqual(2, \count($tags)); $this->assertNotFalse(array_search('foo2', $tags, true), 'Tag foo2 is assigned to the entry'); $this->assertNotFalse(array_search('bar2', $tags, true), 'Tag bar2 is assigned to the entry'); }