We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7e81d65 commit 6542edeCopy full SHA for 6542ede
1 file changed
WampExtension.php
@@ -0,0 +1,18 @@
1
+<?php
2
+
3
+namespace Enqueue\Test;
4
5
+use Enqueue\Wamp\WampConnectionFactory;
6
+use Enqueue\Wamp\WampContext;
7
8
+trait WampExtension
9
+{
10
+ private function buildWampContext(): WampContext
11
+ {
12
+ if (false == $dsn = getenv('WAMP_DSN')) {
13
+ throw new \PHPUnit_Framework_SkippedTestError('Functional tests are not allowed in this environment');
14
+ }
15
16
+ return (new WampConnectionFactory($dsn))->createContext();
17
18
+}
0 commit comments