mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-01 04:23:49 +00:00
add an "active" field on activity type
This commit is contained in:
@@ -67,11 +67,11 @@ class TranslatableActivityTypeTest extends KernelTestCase
|
||||
*
|
||||
* @return \Chill\ActivityBundle\Entity\ActivityType
|
||||
*/
|
||||
protected function getRandomType()
|
||||
protected function getRandomType($active = true)
|
||||
{
|
||||
$types = $this->container->get('doctrine.orm.entity_manager')
|
||||
->getRepository('ChillActivityBundle:ActivityType')
|
||||
->findAll();
|
||||
->findBy(array('active' => $active));
|
||||
|
||||
return $types[array_rand($types)];
|
||||
}
|
||||
@@ -93,7 +93,8 @@ class TranslatableActivityTypeTest extends KernelTestCase
|
||||
$this->assertEquals($type->getId(), $form->getData()['type']->getId());
|
||||
|
||||
// test the ordering of the types in the form
|
||||
$view = $form->createView();
|
||||
// since 2016-11-14 the types are not alphabetically ordered, skipping
|
||||
/*$view = $form->createView();
|
||||
|
||||
$this->assertGreaterThan(0, count($view['type']->vars['choices']),
|
||||
"test that there are at least one choice");
|
||||
@@ -106,7 +107,7 @@ class TranslatableActivityTypeTest extends KernelTestCase
|
||||
$this->assertTrue($previous < $choice->label);
|
||||
$previous = $choice->label;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user