aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/Wallabag/CoreBundle/Command/GenerateUrlHashesCommandTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Wallabag/CoreBundle/Command/GenerateUrlHashesCommandTest.php')
-rw-r--r--tests/Wallabag/CoreBundle/Command/GenerateUrlHashesCommandTest.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/Wallabag/CoreBundle/Command/GenerateUrlHashesCommandTest.php b/tests/Wallabag/CoreBundle/Command/GenerateUrlHashesCommandTest.php
index 8ca772cb..cc1e3fbc 100644
--- a/tests/Wallabag/CoreBundle/Command/GenerateUrlHashesCommandTest.php
+++ b/tests/Wallabag/CoreBundle/Command/GenerateUrlHashesCommandTest.php
@@ -22,7 +22,7 @@ class GenerateUrlHashesCommandTest extends WallabagCoreTestCase
22 'command' => $command->getName(), 22 'command' => $command->getName(),
23 ]); 23 ]);
24 24
25 $this->assertContains('Generating hashed urls for the 3 user account entries', $tester->getDisplay()); 25 $this->assertContains('Generating hashed urls for "3" users', $tester->getDisplay());
26 $this->assertContains('Finished generated hashed urls', $tester->getDisplay()); 26 $this->assertContains('Finished generated hashed urls', $tester->getDisplay());
27 } 27 }
28 28
@@ -55,7 +55,7 @@ class GenerateUrlHashesCommandTest extends WallabagCoreTestCase
55 'username' => 'admin', 55 'username' => 'admin',
56 ]); 56 ]);
57 57
58 $this->assertContains('Generated hashed urls for user admin', $tester->getDisplay()); 58 $this->assertContains('Generated hashed urls for user: admin', $tester->getDisplay());
59 } 59 }
60 60
61 public function testGenerateUrls() 61 public function testGenerateUrls()
@@ -88,11 +88,11 @@ class GenerateUrlHashesCommandTest extends WallabagCoreTestCase
88 'username' => 'admin', 88 'username' => 'admin',
89 ]); 89 ]);
90 90
91 $this->assertContains('Generated hashed urls for user admin', $tester->getDisplay()); 91 $this->assertContains('Generated hashed urls for user: admin', $tester->getDisplay());
92 92
93 $entry = $em->getRepository('WallabagCoreBundle:Entry')->findOneByUrl($url); 93 $entry = $em->getRepository('WallabagCoreBundle:Entry')->findOneByUrl($url);
94 94
95 $this->assertEquals($entry->getHashedUrl(), hash('sha512', $url)); 95 $this->assertSame($entry->getHashedUrl(), hash('md5', $url));
96 96
97 $query = $em->createQuery('DELETE FROM Wallabag\CoreBundle\Entity\Entry e WHERE e.url = :url'); 97 $query = $em->createQuery('DELETE FROM Wallabag\CoreBundle\Entity\Entry e WHERE e.url = :url');
98 $query->setParameter('url', $url); 98 $query->setParameter('url', $url);