]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Fixed export by tags with a tag which contains space 2723/head
authorNicolas Lœuillet <nicolas@loeuillet.org>
Tue, 27 Dec 2016 20:26:53 +0000 (21:26 +0100)
committerNicolas Lœuillet <nicolas@loeuillet.org>
Tue, 27 Dec 2016 20:26:53 +0000 (21:26 +0100)
src/Wallabag/CoreBundle/Controller/TagController.php
src/Wallabag/CoreBundle/DataFixtures/ORM/LoadTagData.php
tests/Wallabag/CoreBundle/Controller/ExportControllerTest.php
tests/Wallabag/CoreBundle/Controller/TagControllerTest.php

index 52707cb8311dae23222d7451ac35ec48ab7d33ae..8a0932892d58567f94b3d46956be208d9d48a867 100644 (file)
@@ -143,7 +143,7 @@ class TagController extends Controller
             'form' => null,
             'entries' => $entries,
             'currentPage' => $page,
-            'tag' => $tag->getLabel(),
+            'tag' => $tag->getSlug(),
         ]);
     }
 }
index 09e99f36bb46b222544d6cfe11484e270231ccac..6de561e0d5843908e414fe44473380f172a008ff 100644 (file)
@@ -15,7 +15,7 @@ class LoadTagData extends AbstractFixture implements OrderedFixtureInterface
     public function load(ObjectManager $manager)
     {
         $tag1 = new Tag();
-        $tag1->setLabel('foo');
+        $tag1->setLabel('foo bar');
 
         $manager->persist($tag1);
 
index 5ca886bd4d9e0a61ba29c12c76aac8ee80e948df..32a18e261a702fdaa80b27a00aa4af1b504915f7 100644 (file)
@@ -119,7 +119,7 @@ class ExportControllerTest extends WallabagCoreTestCase
         $this->assertEquals('binary', $headers->get('content-transfer-encoding'));
 
         ob_start();
-        $crawler = $client->request('GET', '/export/tag_entries.pdf?tag=foo');
+        $crawler = $client->request('GET', '/export/tag_entries.pdf?tag=foo-bar');
         ob_end_clean();
 
         $this->assertEquals(200, $client->getResponse()->getStatusCode());
@@ -241,7 +241,7 @@ class ExportControllerTest extends WallabagCoreTestCase
         $this->assertEquals($contentInDB->getLanguage(), $content[0]['language']);
         $this->assertEquals($contentInDB->getReadingtime(), $content[0]['reading_time']);
         $this->assertEquals($contentInDB->getDomainname(), $content[0]['domain_name']);
-        $this->assertEquals(['foo', 'baz'], $content[0]['tags']);
+        $this->assertEquals(['foo bar', 'baz'], $content[0]['tags']);
     }
 
     public function testXmlExport()
index 769ce66ebfdb685963ec95572f76929d7a2796dc..fa1a3539f4960d5d4b23d00222d404058f2ed12a 100644 (file)
@@ -61,7 +61,7 @@ class TagControllerTest extends WallabagCoreTestCase
 
         // tag already exists but still not assigned to this entry
         $data = [
-            'tag[label]' => 'foo',
+            'tag[label]' => 'foo bar',
         ];
 
         $client->submit($form, $data);