File tree 9 files changed +23
-12
lines changed
9 files changed +23
-12
lines changed Original file line number Diff line number Diff line change 4
4
5
5
use Enqueue \Gps \GpsConnectionFactory ;
6
6
use Enqueue \Gps \GpsContext ;
7
+ use PHPUnit \Framework \SkippedTestError ;
7
8
8
9
trait GpsExtension
9
10
{
10
11
private function buildGpsContext (): GpsContext
11
12
{
12
13
if (false == getenv ('GPS_DSN ' )) {
13
- throw new \ PHPUnit_Framework_SkippedTestError ('Functional tests are not allowed in this environment ' );
14
+ throw new SkippedTestError ('Functional tests are not allowed in this environment ' );
14
15
}
15
16
16
17
$ config = getenv ('GPS_DSN ' );
Original file line number Diff line number Diff line change 4
4
5
5
use Enqueue \AmqpExt \AmqpConnectionFactory ;
6
6
use Enqueue \AmqpExt \AmqpContext ;
7
+ use PHPUnit \Framework \SkippedTestError ;
7
8
8
9
trait RabbitmqAmqpExtension
9
10
{
@@ -13,7 +14,7 @@ trait RabbitmqAmqpExtension
13
14
private function buildAmqpContext ()
14
15
{
15
16
if (false == $ dsn = getenv ('AMQP_DSN ' )) {
16
- throw new \ PHPUnit_Framework_SkippedTestError ('Functional tests are not allowed in this environment ' );
17
+ throw new SkippedTestError ('Functional tests are not allowed in this environment ' );
17
18
}
18
19
19
20
return (new AmqpConnectionFactory ($ dsn ))->createContext ();
Original file line number Diff line number Diff line change 4
4
5
5
use Enqueue \Stomp \StompConnectionFactory ;
6
6
use Enqueue \Stomp \StompContext ;
7
+ use PHPUnit \Framework \SkippedTestError ;
7
8
8
9
trait RabbitmqStompExtension
9
10
{
10
11
private function buildStompContext (): StompContext
11
12
{
12
13
if (false == $ dsn = getenv ('RABITMQ_STOMP_DSN ' )) {
13
- throw new \ PHPUnit_Framework_SkippedTestError ('Functional tests are not allowed in this environment ' );
14
+ throw new SkippedTestError ('Functional tests are not allowed in this environment ' );
14
15
}
15
16
16
17
return (new StompConnectionFactory ($ dsn ))->createContext ();
Original file line number Diff line number Diff line change 6
6
use Enqueue \Redis \PRedis ;
7
7
use Enqueue \Redis \RedisConnectionFactory ;
8
8
use Enqueue \Redis \RedisContext ;
9
+ use PHPUnit \Framework \SkippedTestError ;
9
10
10
11
trait RedisExtension
11
12
{
12
13
private function buildPhpRedisContext (): RedisContext
13
14
{
14
15
if (false == getenv ('PHPREDIS_DSN ' )) {
15
- throw new \ PHPUnit_Framework_SkippedTestError ('Functional tests are not allowed in this environment ' );
16
+ throw new SkippedTestError ('Functional tests are not allowed in this environment ' );
16
17
}
17
18
18
19
$ config = getenv ('PHPREDIS_DSN ' );
@@ -28,7 +29,7 @@ private function buildPhpRedisContext(): RedisContext
28
29
private function buildPRedisContext (): RedisContext
29
30
{
30
31
if (false == getenv ('PREDIS_DSN ' )) {
31
- throw new \ PHPUnit_Framework_SkippedTestError ('Functional tests are not allowed in this environment ' );
32
+ throw new SkippedTestError ('Functional tests are not allowed in this environment ' );
32
33
}
33
34
34
35
$ config = getenv ('PREDIS_DSN ' );
Original file line number Diff line number Diff line change 2
2
3
3
namespace Enqueue \Test ;
4
4
5
+ use PHPUnit \Framework \IncompleteTestError ;
6
+ use PHPUnit \Framework \SkippedTestError ;
7
+
5
8
trait RetryTrait
6
9
{
7
- public function runBare ()
10
+ public function runBare (): void
8
11
{
9
12
$ e = null ;
10
13
@@ -22,9 +25,9 @@ public function runBare()
22
25
parent ::runBare ();
23
26
24
27
return ;
25
- } catch (\ PHPUnit_Framework_IncompleteTestError $ e ) {
28
+ } catch (IncompleteTestError $ e ) {
26
29
throw $ e ;
27
- } catch (\ PHPUnit_Framework_SkippedTestError $ e ) {
30
+ } catch (SkippedTestError $ e ) {
28
31
throw $ e ;
29
32
} catch (\Throwable $ e ) {
30
33
// last one thrown below
Original file line number Diff line number Diff line change 4
4
5
5
use Enqueue \Sns \SnsConnectionFactory ;
6
6
use Enqueue \Sns \SnsContext ;
7
+ use PHPUnit \Framework \SkippedTestError ;
7
8
8
9
trait SnsExtension
9
10
{
10
11
private function buildSqsContext (): SnsContext
11
12
{
12
13
if (false == $ dsn = getenv ('SNS_DSN ' )) {
13
- throw new \ PHPUnit_Framework_SkippedTestError ('Functional tests are not allowed in this environment ' );
14
+ throw new SkippedTestError ('Functional tests are not allowed in this environment ' );
14
15
}
15
16
16
17
return (new SnsConnectionFactory ($ dsn ))->createContext ();
Original file line number Diff line number Diff line change 4
4
5
5
use Enqueue \SnsQs \SnsQsConnectionFactory ;
6
6
use Enqueue \SnsQs \SnsQsContext ;
7
+ use PHPUnit \Framework \SkippedTestError ;
7
8
8
9
trait SnsQsExtension
9
10
{
10
11
private function buildSnsQsContext (): SnsQsContext
11
12
{
12
13
if (false == $ dsn = getenv ('SNSQS_DSN ' )) {
13
- throw new \ PHPUnit_Framework_SkippedTestError ('Functional tests are not allowed in this environment ' );
14
+ throw new SkippedTestError ('Functional tests are not allowed in this environment ' );
14
15
}
15
16
16
17
return (new SnsQsConnectionFactory ($ dsn ))->createContext ();
Original file line number Diff line number Diff line change 4
4
5
5
use Enqueue \Sqs \SqsConnectionFactory ;
6
6
use Enqueue \Sqs \SqsContext ;
7
+ use PHPUnit \Framework \SkippedTestError ;
7
8
8
9
trait SqsExtension
9
10
{
10
11
private function buildSqsContext (): SqsContext
11
12
{
12
13
if (false == $ dsn = getenv ('SQS_DSN ' )) {
13
- throw new \ PHPUnit_Framework_SkippedTestError ('Functional tests are not allowed in this environment ' );
14
+ throw new SkippedTestError ('Functional tests are not allowed in this environment ' );
14
15
}
15
16
16
17
return (new SqsConnectionFactory ($ dsn ))->createContext ();
Original file line number Diff line number Diff line change 4
4
5
5
use Enqueue \Wamp \WampConnectionFactory ;
6
6
use Enqueue \Wamp \WampContext ;
7
+ use PHPUnit \Framework \SkippedTestError ;
7
8
8
9
trait WampExtension
9
10
{
10
11
private function buildWampContext (): WampContext
11
12
{
12
13
if (false == $ dsn = getenv ('WAMP_DSN ' )) {
13
- throw new \ PHPUnit_Framework_SkippedTestError ('Functional tests are not allowed in this environment ' );
14
+ throw new SkippedTestError ('Functional tests are not allowed in this environment ' );
14
15
}
15
16
16
17
return (new WampConnectionFactory ($ dsn ))->createContext ();
You can’t perform that action at this time.
0 commit comments