Mark mailer tests as skipped
Instead of silently returning [MAILPOET-2358]
This commit is contained in:
committed by
Jack Kitterhing
parent
e8be427097
commit
3b390e9d88
@ -185,7 +185,7 @@ class MailerTest extends \MailPoetTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function testItCanSend() {
|
function testItCanSend() {
|
||||||
if (getenv('WP_TEST_MAILER_ENABLE_SENDING') !== 'true') return;
|
if (getenv('WP_TEST_MAILER_ENABLE_SENDING') !== 'true') $this->markTestSkipped();
|
||||||
$this->sender['address'] = 'staff@mailpoet.com';
|
$this->sender['address'] = 'staff@mailpoet.com';
|
||||||
$mailer = new Mailer();
|
$mailer = new Mailer();
|
||||||
$mailer->init($this->mailer, $this->sender, $this->reply_to);
|
$mailer->init($this->mailer, $this->sender, $this->reply_to);
|
||||||
|
@ -215,7 +215,7 @@ class AmazonSESTest extends \MailPoetTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function testItCannotSendWithoutProperAccessKey() {
|
function testItCannotSendWithoutProperAccessKey() {
|
||||||
if (getenv('WP_TEST_MAILER_ENABLE_SENDING') !== 'true') return;
|
if (getenv('WP_TEST_MAILER_ENABLE_SENDING') !== 'true') $this->markTestSkipped();
|
||||||
$this->mailer->aws_access_key = 'somekey';
|
$this->mailer->aws_access_key = 'somekey';
|
||||||
$result = $this->mailer->send(
|
$result = $this->mailer->send(
|
||||||
$this->newsletter,
|
$this->newsletter,
|
||||||
@ -253,7 +253,7 @@ class AmazonSESTest extends \MailPoetTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function testItCanSend() {
|
function testItCanSend() {
|
||||||
if (getenv('WP_TEST_MAILER_ENABLE_SENDING') !== 'true') return;
|
if (getenv('WP_TEST_MAILER_ENABLE_SENDING') !== 'true') $this->markTestSkipped();
|
||||||
$result = $this->mailer->send(
|
$result = $this->mailer->send(
|
||||||
$this->newsletter,
|
$this->newsletter,
|
||||||
$this->subscriber
|
$this->subscriber
|
||||||
|
@ -126,7 +126,7 @@ class MailPoetAPITest extends \MailPoetTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function testItWillNotSendIfApiKeyIsMarkedInvalid() {
|
function testItWillNotSendIfApiKeyIsMarkedInvalid() {
|
||||||
if (getenv('WP_TEST_MAILER_ENABLE_SENDING') !== 'true') return;
|
if (getenv('WP_TEST_MAILER_ENABLE_SENDING') !== 'true') $this->markTestSkipped();
|
||||||
$this->mailer->api_key = 'someapi';
|
$this->mailer->api_key = 'someapi';
|
||||||
$this->mailer->services_checker = Stub::make(
|
$this->mailer->services_checker = Stub::make(
|
||||||
new ServicesChecker(),
|
new ServicesChecker(),
|
||||||
@ -141,7 +141,7 @@ class MailPoetAPITest extends \MailPoetTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function testItCannotSendWithoutProperApiKey() {
|
function testItCannotSendWithoutProperApiKey() {
|
||||||
if (getenv('WP_TEST_MAILER_ENABLE_SENDING') !== 'true') return;
|
if (getenv('WP_TEST_MAILER_ENABLE_SENDING') !== 'true') $this->markTestSkipped();
|
||||||
$this->mailer->api->setKey('someapi');
|
$this->mailer->api->setKey('someapi');
|
||||||
$result = $this->mailer->send(
|
$result = $this->mailer->send(
|
||||||
$this->newsletter,
|
$this->newsletter,
|
||||||
@ -151,7 +151,7 @@ class MailPoetAPITest extends \MailPoetTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function testItCanSend() {
|
function testItCanSend() {
|
||||||
if (getenv('WP_TEST_MAILER_ENABLE_SENDING') !== 'true') return;
|
if (getenv('WP_TEST_MAILER_ENABLE_SENDING') !== 'true') $this->markTestSkipped();
|
||||||
$result = $this->mailer->send(
|
$result = $this->mailer->send(
|
||||||
$this->newsletter,
|
$this->newsletter,
|
||||||
$this->subscriber
|
$this->subscriber
|
||||||
|
@ -145,7 +145,7 @@ class PHPMailTest extends \MailPoetTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function testItCanSend() {
|
function testItCanSend() {
|
||||||
if (getenv('WP_TEST_MAILER_ENABLE_SENDING') !== 'true') return;
|
if (getenv('WP_TEST_MAILER_ENABLE_SENDING') !== 'true') $this->markTestSkipped();
|
||||||
$result = $this->mailer->send(
|
$result = $this->mailer->send(
|
||||||
$this->newsletter,
|
$this->newsletter,
|
||||||
$this->subscriber
|
$this->subscriber
|
||||||
|
@ -123,7 +123,7 @@ class SMTPTest extends \MailPoetTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function testItCantSendWithoutProperAuthentication() {
|
function testItCantSendWithoutProperAuthentication() {
|
||||||
if (getenv('WP_TEST_MAILER_ENABLE_SENDING') !== 'true') return;
|
if (getenv('WP_TEST_MAILER_ENABLE_SENDING') !== 'true') $this->markTestSkipped();
|
||||||
$this->mailer->login = 'someone';
|
$this->mailer->login = 'someone';
|
||||||
$this->mailer->mailer = $this->mailer->buildMailer();
|
$this->mailer->mailer = $this->mailer->buildMailer();
|
||||||
$result = $this->mailer->send(
|
$result = $this->mailer->send(
|
||||||
@ -192,7 +192,7 @@ class SMTPTest extends \MailPoetTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function testItCanSend() {
|
function testItCanSend() {
|
||||||
if (getenv('WP_TEST_MAILER_ENABLE_SENDING') !== 'true') return;
|
if (getenv('WP_TEST_MAILER_ENABLE_SENDING') !== 'true') $this->markTestSkipped();
|
||||||
$result = $this->mailer->send(
|
$result = $this->mailer->send(
|
||||||
$this->newsletter,
|
$this->newsletter,
|
||||||
$this->subscriber
|
$this->subscriber
|
||||||
|
@ -76,7 +76,7 @@ class SendGridTest extends \MailPoetTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function testItCannotSendWithoutProperApiKey() {
|
function testItCannotSendWithoutProperApiKey() {
|
||||||
if (getenv('WP_TEST_MAILER_ENABLE_SENDING') !== 'true') return;
|
if (getenv('WP_TEST_MAILER_ENABLE_SENDING') !== 'true') $this->markTestSkipped();
|
||||||
$this->mailer->api_key = 'someapi';
|
$this->mailer->api_key = 'someapi';
|
||||||
$result = $this->mailer->send(
|
$result = $this->mailer->send(
|
||||||
$this->newsletter,
|
$this->newsletter,
|
||||||
@ -103,7 +103,7 @@ class SendGridTest extends \MailPoetTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function testItCanSend() {
|
function testItCanSend() {
|
||||||
if (getenv('WP_TEST_MAILER_ENABLE_SENDING') !== 'true') return;
|
if (getenv('WP_TEST_MAILER_ENABLE_SENDING') !== 'true') $this->markTestSkipped();
|
||||||
$result = $this->mailer->send(
|
$result = $this->mailer->send(
|
||||||
$this->newsletter,
|
$this->newsletter,
|
||||||
$this->subscriber
|
$this->subscriber
|
||||||
|
Reference in New Issue
Block a user