aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/AnnotationBundle
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/AnnotationBundle')
-rw-r--r--src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php1
-rw-r--r--src/Wallabag/AnnotationBundle/Tests/Controller/AnnotationControllerTest.php2
2 files changed, 2 insertions, 1 deletions
diff --git a/src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php b/src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php
index 7f35373f..5f7da70e 100644
--- a/src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php
+++ b/src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php
@@ -101,6 +101,7 @@ class AnnotationRepository extends EntityRepository
101 return $this->createQueryBuilder('a') 101 return $this->createQueryBuilder('a')
102 ->leftJoin('a.user', 'u') 102 ->leftJoin('a.user', 'u')
103 ->where('u.username = :username')->setParameter('username', $username) 103 ->where('u.username = :username')->setParameter('username', $username)
104 ->orderBy('a.id', 'DESC')
104 ->setMaxResults(1) 105 ->setMaxResults(1)
105 ->getQuery() 106 ->getQuery()
106 ->getSingleResult(); 107 ->getSingleResult();
diff --git a/src/Wallabag/AnnotationBundle/Tests/Controller/AnnotationControllerTest.php b/src/Wallabag/AnnotationBundle/Tests/Controller/AnnotationControllerTest.php
index 7a877f98..e972c2de 100644
--- a/src/Wallabag/AnnotationBundle/Tests/Controller/AnnotationControllerTest.php
+++ b/src/Wallabag/AnnotationBundle/Tests/Controller/AnnotationControllerTest.php
@@ -81,7 +81,7 @@ class AnnotationControllerTest extends WallabagAnnotationTestCase
81 $this->assertEquals('Big boss', $content['user']); 81 $this->assertEquals('Big boss', $content['user']);
82 $this->assertEquals('v1.0', $content['annotator_schema_version']); 82 $this->assertEquals('v1.0', $content['annotator_schema_version']);
83 $this->assertEquals('a modified annotation', $content['text']); 83 $this->assertEquals('a modified annotation', $content['text']);
84 $this->assertEquals('content', $content['quote']); 84 $this->assertEquals('my quote', $content['quote']);
85 85
86 $annotationUpdated = $this->client->getContainer() 86 $annotationUpdated = $this->client->getContainer()
87 ->get('doctrine.orm.entity_manager') 87 ->get('doctrine.orm.entity_manager')