]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - tests/Wallabag/CoreBundle/Command/GenerateUrlHashesCommandTest.php
Use a better index for hashed_url
[github/wallabag/wallabag.git] / tests / Wallabag / CoreBundle / Command / GenerateUrlHashesCommandTest.php
index cc1e3fbc734138a1254594bfb532443a2be8fcb8..17eed210b275c2387766bfeb776e18cf29827600 100644 (file)
@@ -72,11 +72,8 @@ class GenerateUrlHashesCommandTest extends WallabagCoreTestCase
         $entry1->setUrl($url);
 
         $em->persist($entry1);
-
         $em->flush();
 
-        $this->assertNull($entry1->getHashedUrl());
-
         $application = new Application($this->getClient()->getKernel());
         $application->add(new GenerateUrlHashesCommand());
 
@@ -92,7 +89,7 @@ class GenerateUrlHashesCommandTest extends WallabagCoreTestCase
 
         $entry = $em->getRepository('WallabagCoreBundle:Entry')->findOneByUrl($url);
 
-        $this->assertSame($entry->getHashedUrl(), hash('md5', $url));
+        $this->assertSame($entry->getHashedUrl(), hash('sha1', $url));
 
         $query = $em->createQuery('DELETE FROM Wallabag\CoreBundle\Entity\Entry e WHERE e.url = :url');
         $query->setParameter('url', $url);