Instead of retrieving a random annotation, sort them to be sure they are all the same no matter the database used
return $this->createQueryBuilder('a')
->leftJoin('a.user', 'u')
->where('u.username = :username')->setParameter('username', $username)
+ ->orderBy('a.id', 'DESC')
->setMaxResults(1)
->getQuery()
->getSingleResult();
$this->assertEquals('Big boss', $content['user']);
$this->assertEquals('v1.0', $content['annotator_schema_version']);
$this->assertEquals('a modified annotation', $content['text']);
- $this->assertEquals('content', $content['quote']);
+ $this->assertEquals('my quote', $content['quote']);
$annotationUpdated = $this->client->getContainer()
->get('doctrine.orm.entity_manager')