File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -8,9 +8,18 @@ class DnsTest extends TestCase
88 */
99 private static $ _webspace ;
1010
11+ /**
12+ * @var bool
13+ */
14+ private static $ _isDnsSupported ;
15+
1116 public static function setUpBeforeClass ()
1217 {
1318 parent ::setUpBeforeClass ();
19+
20+ $ serviceStates = static ::$ _client ->server ()->getServiceStates ();
21+ static ::$ _isDnsSupported = $ serviceStates ['dns ' ] && ('running ' == $ serviceStates ['dns ' ]['state ' ]);
22+
1423 static ::$ _webspace = static ::_createWebspace ('example.dom ' );
1524 }
1625
@@ -20,6 +29,15 @@ public static function tearDownAfterClass()
2029 static ::$ _client ->webspace ()->delete ('id ' , static ::$ _webspace ->id );
2130 }
2231
32+ protected function setUp ()
33+ {
34+ parent ::setUp ();
35+
36+ if (!static ::$ _isDnsSupported ) {
37+ $ this ->markTestSkipped ('DNS system is not supported. ' );
38+ }
39+ }
40+
2341 public function testCreate ()
2442 {
2543 $ dns = static ::$ _client ->dns ()->create ([
You can’t perform that action at this time.
0 commit comments