File tree Expand file tree Collapse file tree
pkg/job-queue/Tests/Functional Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -40,6 +40,8 @@ waitForService mongo 27017 50
4040waitForService localstack 4576 50
4141
4242php docker/bin/refresh-mysql-database.php
43+ php pkg/job-queue/Tests/Functional/app/console doctrine:database:create --if-not-exists
44+ php pkg/job-queue/Tests/Functional/app/console doctrine:schema:update --force
4345
4446# php pkg/enqueue-bundle/Tests/Functional/app/console.php config:dump-reference enqueue
4547bin/phpunit " $@ "
Original file line number Diff line number Diff line change 9898 </testsuite >
9999 </testsuites >
100100
101+ <php >
102+ <env name =" SHELL_VERBOSITY" value =" -1" />
103+ </php >
104+
101105 <filter >
102106 <whitelist >
103107 <directory suffix =" .php" >.</directory >
Original file line number Diff line number Diff line change @@ -138,14 +138,14 @@ public function testShouldThrowIfDuplicateJob()
138138 */
139139 private function getEntityManager ()
140140 {
141- return $ this -> container ->get ('doctrine.orm.default_entity_manager ' );
141+ return static :: $ container ->get ('doctrine.orm.default_entity_manager ' );
142142 }
143143
144144 /**
145145 * @return \Enqueue\JobQueue\Doctrine\JobStorage
146146 */
147147 private function getJobStorage ()
148148 {
149- return new JobStorage ($ this -> container ->get ('doctrine ' ), Job::class, 'enqueue_job_queue_unique ' );
149+ return new JobStorage (static :: $ container ->get ('doctrine ' ), Job::class, 'enqueue_job_queue_unique ' );
150150 }
151151}
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ public static function getKernelClass()
5353 protected function startTransaction ()
5454 {
5555 /** @var $em \Doctrine\ORM\EntityManager */
56- foreach ($ this -> container ->get ('doctrine ' )->getManagers () as $ em ) {
56+ foreach (static :: $ container ->get ('doctrine ' )->getManagers () as $ em ) {
5757 $ em ->clear ();
5858 $ em ->getConnection ()->beginTransaction ();
5959 }
@@ -64,12 +64,12 @@ protected function rollbackTransaction()
6464 //the error can be thrown during setUp
6565 //It would be caught by phpunit and tearDown called.
6666 //In this case we could not rollback since container may not exist.
67- if (false == $ this -> container ) {
67+ if (false == static :: $ container ) {
6868 return ;
6969 }
7070
7171 /** @var $em \Doctrine\ORM\EntityManager */
72- foreach ($ this -> container ->get ('doctrine ' )->getManagers () as $ em ) {
72+ foreach (static :: $ container ->get ('doctrine ' )->getManagers () as $ em ) {
7373 $ connection = $ em ->getConnection ();
7474
7575 while ($ connection ->isTransactionActive ()) {
You can’t perform that action at this time.
0 commit comments