Mark network tests as skipped

Instead of silently returning

[MAILPOET-2358]
This commit is contained in:
Pavel Dohnal
2019-09-17 15:11:37 +02:00
committed by Jack Kitterhing
parent 3b390e9d88
commit 227ec2adc9
4 changed files with 14 additions and 14 deletions

View File

@ -228,7 +228,7 @@ class CronHelperTest extends \MailPoetTest {
$site_url = 'http://example.com';
expect(CronHelper::getSiteUrl($site_url))->equals($site_url);
if (getenv('WP_TEST_ENABLE_NETWORK_TESTS') !== 'true') return;
if (getenv('WP_TEST_ENABLE_NETWORK_TESTS') !== 'true') $this->markTestSkipped();
// 2. when url contains valid port, try connecting to it
$site_url = 'http://example.com:80';
@ -308,7 +308,7 @@ class CronHelperTest extends \MailPoetTest {
}
function testItPingsDaemon() {
if (getenv('WP_TEST_ENABLE_NETWORK_TESTS') !== 'true') return;
if (getenv('WP_TEST_ENABLE_NETWORK_TESTS') !== 'true') $this->markTestSkipped();
// raw response is returned
expect(CronHelper::pingDaemon())->equals(DaemonHttpRunner::PING_SUCCESS_RESPONSE);
}