Fix test for course description

pull/3989/head
Angel Fernando Quiroz Campos 4 years ago
parent 86ad76a0e2
commit a2369f7a9b
  1. 4
      src/CourseBundle/Repository/CCourseDescriptionRepository.php
  2. 2
      tests/CourseBundle/Repository/CCourseDescriptionRepositoryTest.php

@ -23,8 +23,8 @@ final class CCourseDescriptionRepository extends ResourceRepository
public function findByTypeInCourse(int $type, Course $course, Session $session = null, CGroup $group = null)
{
$qb = $this->getResourcesByCourse($course, $session, $group)
->where('resource.descriptionType = :type')
->setParameter('type', $type)
->andWhere('resource.descriptionType = :description_type')
->setParameter('description_type', $type)
;
$query = $qb->getQuery();

@ -38,7 +38,7 @@ class CCourseDescriptionRepositoryTest extends AbstractApiTest
$em->flush();
$this->assertSame('title', (string) $item);
$this->assertSame(1, $repo->count([]));
$this->assertSame(5, $repo->count([]));
}
public function testGetDescriptions(): void

Loading…
Cancel
Save