mirror of
				https://gitlab.com/Chill-Projet/chill-bundles.git
				synced 2025-10-31 01:08:26 +00:00 
			
		
		
		
	Compare commits
	
		
			6 Commits
		
	
	
		
			425-rename
			...
			test/fixes
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| d4feacc8da | |||
| d55311ce40 | |||
| 07608dc412 | |||
| 83a9969220 | |||
| a5295123d4 | |||
| a947b9defb | 
| @@ -94,7 +94,8 @@ unit_tests: | ||||
|         - php -d memory_limit=2G tests/app/bin/console cache:clear --env=dev | ||||
|         - php -d memory_limit=3G tests/app/bin/console doctrine:fixtures:load -n | ||||
|         - php -d memory_limit=2G tests/app/bin/console cache:clear --env=test | ||||
|         - php -d memory_limit=4G bin/phpunit --colors=never | ||||
|         - php -d memory_limit=2G tests/app/bin/console doctrine:query:dql "SELECT c.name FROM Chill\\MainBundle\\Entity\\Center c" | ||||
|         - php -d memory_limit=4G bin/phpunit --colors=never --testdox | ||||
|     artifacts: | ||||
|         expire_in: 30 min | ||||
|         paths: | ||||
|   | ||||
| @@ -14,7 +14,7 @@ | ||||
|     {% if is_granted('CHILL_PERSON_ACCOMPANYING_PERIOD_UPDATE', period) %} | ||||
|         <div class="item-col item-meta"> | ||||
|             {% set job_id = null %} | ||||
|             {% if period.job is defined %} | ||||
|             {% if period.job is not null %} | ||||
|                 {% set job_id = period.job.id %} | ||||
|             {% endif %} | ||||
|             <span | ||||
|   | ||||
| @@ -13,6 +13,7 @@ namespace Chill\PersonBundle\Tests\Controller; | ||||
|  | ||||
| use Chill\MainBundle\Test\PrepareClientTrait; | ||||
| use DateTime; | ||||
| use Doctrine\ORM\EntityManagerInterface; | ||||
| use Symfony\Bundle\FrameworkBundle\KernelBrowser; | ||||
| use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; | ||||
| use Symfony\Component\DomCrawler\Form; | ||||
| @@ -48,21 +49,21 @@ final class PersonControllerCreateTest extends WebTestCase | ||||
|     public static function tearDownAfterClass(): void | ||||
|     { | ||||
|         self::bootKernel(); | ||||
|         $em = self::$kernel->getContainer()->get('doctrine.orm.entity_manager'); | ||||
|         $em = self::$kernel->getContainer()->get(EntityManagerInterface::class); | ||||
|  | ||||
|         //remove two people created during test | ||||
|         $jesus = $em->getRepository(\Chill\PersonBundle\Entity\Person::class) | ||||
|             ->findOneBy(['firstName' => 'God']); | ||||
|  | ||||
|         if (null !== $jesus) { | ||||
|             $em->remove($jesus); | ||||
|             //$em->remove($jesus); | ||||
|         } | ||||
|  | ||||
|         $jesus2 = $em->getRepository(\Chill\PersonBundle\Entity\Person::class) | ||||
|             ->findOneBy(['firstName' => 'roger']); | ||||
|  | ||||
|         if (null !== $jesus2) { | ||||
|             $em->remove($jesus2); | ||||
|             //$em->remove($jesus2); | ||||
|         } | ||||
|         $em->flush(); | ||||
|     } | ||||
|   | ||||
| @@ -12,6 +12,7 @@ declare(strict_types=1); | ||||
| namespace Chill\PersonBundle\Tests\Controller; | ||||
|  | ||||
| use Chill\MainBundle\Entity\Center; | ||||
| use Chill\MainBundle\Repository\CenterRepository; | ||||
| use Chill\MainBundle\Test\PrepareClientTrait; | ||||
| use Chill\PersonBundle\Entity\Person; | ||||
| use Closure; | ||||
| @@ -60,9 +61,14 @@ final class PersonControllerUpdateTest extends WebTestCase | ||||
|         $this->em = self::$container | ||||
|             ->get(EntityManagerInterface::class); | ||||
|  | ||||
|         $center = $this->em->getRepository(Center::class) | ||||
|         $center = self::$container->get(CenterRepository::class) | ||||
|             ->findOneBy(['name' => 'Center A']); | ||||
|  | ||||
|         var_dump(array_map( | ||||
|             function (Center $c) { return $c->getName(); }, | ||||
|             self::$container->get(CenterRepository::class)->findAll() | ||||
|         )); | ||||
|  | ||||
|         $this->person = (new Person()) | ||||
|             ->setLastName('My Beloved') | ||||
|             ->setFirstName('Jesus') | ||||
|   | ||||
		Reference in New Issue
	
	Block a user