Fixed export by tags with a tag which contains space

This commit is contained in:
Nicolas Lœuillet 2016-12-27 21:26:53 +01:00
parent 7719346328
commit c8de7ab94c
No known key found for this signature in database
GPG key ID: BDC1EFB5CA0145F2
4 changed files with 5 additions and 5 deletions

View file

@ -143,7 +143,7 @@ class TagController extends Controller
'form' => null,
'entries' => $entries,
'currentPage' => $page,
'tag' => $tag->getLabel(),
'tag' => $tag->getSlug(),
]);
}
}

View 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);

View 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()

View 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);