File tree 4 files changed +11
-5
lines changed
pkg/job-queue/Tests/Functional
4 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,8 @@ waitForService mongo 27017 50
40
40
waitForService localstack 4576 50
41
41
42
42
php 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
43
45
44
46
# php pkg/enqueue-bundle/Tests/Functional/app/console.php config:dump-reference enqueue
45
47
bin/phpunit " $@ "
Original file line number Diff line number Diff line change 98
98
</testsuite >
99
99
</testsuites >
100
100
101
+ <php >
102
+ <env name =" SHELL_VERBOSITY" value =" -1" />
103
+ </php >
104
+
101
105
<filter >
102
106
<whitelist >
103
107
<directory suffix =" .php" >.</directory >
Original file line number Diff line number Diff line change @@ -138,14 +138,14 @@ public function testShouldThrowIfDuplicateJob()
138
138
*/
139
139
private function getEntityManager ()
140
140
{
141
- return $ this -> container ->get ('doctrine.orm.default_entity_manager ' );
141
+ return static :: $ container ->get ('doctrine.orm.default_entity_manager ' );
142
142
}
143
143
144
144
/**
145
145
* @return \Enqueue\JobQueue\Doctrine\JobStorage
146
146
*/
147
147
private function getJobStorage ()
148
148
{
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 ' );
150
150
}
151
151
}
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ public static function getKernelClass()
53
53
protected function startTransaction ()
54
54
{
55
55
/** @var $em \Doctrine\ORM\EntityManager */
56
- foreach ($ this -> container ->get ('doctrine ' )->getManagers () as $ em ) {
56
+ foreach (static :: $ container ->get ('doctrine ' )->getManagers () as $ em ) {
57
57
$ em ->clear ();
58
58
$ em ->getConnection ()->beginTransaction ();
59
59
}
@@ -64,12 +64,12 @@ protected function rollbackTransaction()
64
64
//the error can be thrown during setUp
65
65
//It would be caught by phpunit and tearDown called.
66
66
//In this case we could not rollback since container may not exist.
67
- if (false == $ this -> container ) {
67
+ if (false == static :: $ container ) {
68
68
return ;
69
69
}
70
70
71
71
/** @var $em \Doctrine\ORM\EntityManager */
72
- foreach ($ this -> container ->get ('doctrine ' )->getManagers () as $ em ) {
72
+ foreach (static :: $ container ->get ('doctrine ' )->getManagers () as $ em ) {
73
73
$ connection = $ em ->getConnection ();
74
74
75
75
while ($ connection ->isTransactionActive ()) {
You can’t perform that action at this time.
0 commit comments