We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 011f4be commit 9510412Copy full SHA for 9510412
1 file changed
GpsExtension.php
@@ -0,0 +1,20 @@
1
+<?php
2
+
3
+namespace Enqueue\Test;
4
5
+use Enqueue\Gps\GpsConnectionFactory;
6
+use Enqueue\Gps\GpsContext;
7
8
+trait GpsExtension
9
+{
10
+ private function buildGpsContext(): GpsContext
11
+ {
12
+ if (false == getenv('GPS_DSN')) {
13
+ throw new \PHPUnit_Framework_SkippedTestError('Functional tests are not allowed in this environment');
14
+ }
15
16
+ $config = getenv('GPS_DSN');
17
18
+ return (new GpsConnectionFactory($config))->createContext();
19
20
+}
0 commit comments