public function testFindAllUsersByDepartmentAndRoles()
{
$this->users = $this->em->getRepository('AppBundle:User')->findAllUsersByDepartmentAndRoles(1, $this->em->getRepository('AppBundle:Role')->findOneByRole('ROLE_USER'));
foreach ($this->users as $this->user) {
$this->assertEquals(1, $this->user->getFieldOfStudy()->getDepartment()->getId());
$this->assertContains(toArray('ROLE_USER'), $this->user->getRoles());
}
}