@@ -24,13 +24,41 @@ protected function checkRequirements()
24
24
{
25
25
parent ::checkRequirements ();
26
26
27
- if (!array_key_exists ('skipIfTravis ' , $ this ->getAnnotations ()['method ' ])) {
28
- return ;
29
- }
30
-
31
27
if (getenv ('TRAVIS ' ) || getenv ('CI ' )) {
32
28
$ this ->markTestSkipped ('This test does not run on Travis. ' );
33
29
}
30
+
31
+ if (!getenv ('STANDARD_ENDPOINT ' )) {
32
+ $ this ->markTestSkipped ('No \'STANDARD_ENDPOINT \' found in env. ' );
33
+ }
34
+
35
+ if (!getenv ('GCM_ENDPOINT ' )) {
36
+ $ this ->markTestSkipped ('No \'GCM_ENDPOINT \' found in env. ' );
37
+ }
38
+
39
+ if (!getenv ('USER_PUBLIC_KEY ' )) {
40
+ $ this ->markTestSkipped ('No \'USER_PUBLIC_KEY \' found in env. ' );
41
+ }
42
+
43
+ if (!getenv ('GCM_USER_PUBLIC_KEY ' )) {
44
+ $ this ->markTestSkipped ('No \'GCM_USER_PUBLIC_KEY \' found in env. ' );
45
+ }
46
+
47
+ if (!getenv ('USER_AUTH_TOKEN ' )) {
48
+ $ this ->markTestSkipped ('No \'USER_PUBLIC_KEY \' found in env. ' );
49
+ }
50
+
51
+ if (!getenv ('GCM_USER_AUTH_TOKEN ' )) {
52
+ $ this ->markTestSkipped ('No \'GCM_USER_AUTH_TOKEN \' found in env. ' );
53
+ }
54
+
55
+ if (!getenv ('VAPID_PUBLIC_KEY ' )) {
56
+ $ this ->markTestSkipped ('No \'VAPID_PUBLIC_KEY \' found in env. ' );
57
+ }
58
+
59
+ if (!getenv ('VAPID_PRIVATE_KEY ' )) {
60
+ $ this ->markTestSkipped ('No \'VAPID_PRIVATE_KEY \' found in env. ' );
61
+ }
34
62
}
35
63
36
64
public static function setUpBeforeClass ()
@@ -77,7 +105,6 @@ public function notificationProvider()
77
105
78
106
/**
79
107
* @dataProvider notificationProvider
80
- * @skipIfTravis
81
108
*
82
109
* @param string $endpoint
83
110
* @param string $payload
@@ -103,9 +130,6 @@ public function testSendNotificationWithTooBigPayload()
103
130
);
104
131
}
105
132
106
- /**
107
- * @skipIfTravis
108
- */
109
133
public function testFlush ()
110
134
{
111
135
$ this ->webPush ->sendNotification (self ::$ endpoints ['standard ' ]);
@@ -118,9 +142,6 @@ public function testFlush()
118
142
$ this ->assertTrue ($ this ->webPush ->flush ());
119
143
}
120
144
121
- /**
122
- * @skipIfTravis
123
- */
124
145
public function testSendGCMNotificationWithoutGCMApiKey ()
125
146
{
126
147
$ webPush = new WebPush ();
@@ -129,9 +150,6 @@ public function testSendGCMNotificationWithoutGCMApiKey()
129
150
$ webPush ->sendNotification (self ::$ endpoints ['GCM ' ], null , null , null , true );
130
151
}
131
152
132
- /**
133
- * @skipIfTravis
134
- */
135
153
public function testSendGCMNotificationWithWrongGCMApiKey ()
136
154
{
137
155
$ webPush = new WebPush (array ('GCM ' => 'bar ' ));
0 commit comments