adds test skip condition if dsn not provided
This commit is contained in:
parent
0dafc59cc2
commit
a4c8d852a5
4 changed files with 56 additions and 0 deletions
|
@ -744,6 +744,10 @@ class AccountCustomClientTest extends Scope
|
|||
|
||||
public function testCreatePhone(): array
|
||||
{
|
||||
if (empty(App::getEnv('_APP_MESSAGE_SMS_TEST_DSN'))) {
|
||||
$this->markTestSkipped('SMS DSN not provided');
|
||||
}
|
||||
|
||||
$smsDSN = new DSN(App::getEnv('_APP_MESSAGE_SMS_TEST_DSN'));
|
||||
$to = $smsDSN->getParam('to');
|
||||
$from = $smsDSN->getParam('from');
|
||||
|
|
|
@ -124,6 +124,10 @@ class AccountTest extends Scope
|
|||
*/
|
||||
public function testCreatePhoneVerification(): array
|
||||
{
|
||||
if (empty(App::getEnv('_APP_MESSAGE_SMS_TEST_DSN'))) {
|
||||
$this->markTestSkipped('SMS DSN not provided');
|
||||
}
|
||||
|
||||
$smsDSN = new DSN(App::getEnv('_APP_MESSAGE_SMS_TEST_DSN'));
|
||||
$to = $smsDSN->getParam('to');
|
||||
$from = $smsDSN->getParam('from');
|
||||
|
|
|
@ -527,6 +527,10 @@ class MessagingTest extends Scope
|
|||
|
||||
public function testSendEmail()
|
||||
{
|
||||
if (empty(App::getEnv('_APP_MESSAGE_EMAIL_TEST_DSN'))) {
|
||||
$this->markTestSkipped('Email DSN not provided');
|
||||
}
|
||||
|
||||
$emailDSN = new DSN(App::getEnv('_APP_MESSAGE_EMAIL_TEST_DSN'));
|
||||
$to = $emailDSN->getParam('to');
|
||||
$from = $emailDSN->getParam('from');
|
||||
|
@ -674,6 +678,10 @@ class MessagingTest extends Scope
|
|||
*/
|
||||
public function testUpdateEmail(array $email)
|
||||
{
|
||||
if (empty(App::getEnv('_APP_MESSAGE_EMAIL_TEST_DSN'))) {
|
||||
$this->markTestSkipped('Email DSN not provided');
|
||||
}
|
||||
|
||||
$emailDSN = new DSN(App::getEnv('_APP_MESSAGE_EMAIL_TEST_DSN'));
|
||||
$to = $emailDSN->getParam('to');
|
||||
$from = $emailDSN->getParam('from');
|
||||
|
@ -833,6 +841,10 @@ class MessagingTest extends Scope
|
|||
|
||||
public function testSendSMS()
|
||||
{
|
||||
if (empty(App::getEnv('_APP_MESSAGE_SMS_TEST_DSN'))) {
|
||||
$this->markTestSkipped('SMS DSN not provided');
|
||||
}
|
||||
|
||||
$smsDSN = new DSN(App::getEnv('_APP_MESSAGE_SMS_TEST_DSN'));
|
||||
$to = $smsDSN->getParam('to');
|
||||
$from = $smsDSN->getParam('from');
|
||||
|
@ -976,6 +988,10 @@ class MessagingTest extends Scope
|
|||
*/
|
||||
public function testUpdateSMS(array $sms)
|
||||
{
|
||||
if (empty(App::getEnv('_APP_MESSAGE_SMS_TEST_DSN'))) {
|
||||
$this->markTestSkipped('SMS DSN not provided');
|
||||
}
|
||||
|
||||
$smsDSN = new DSN(App::getEnv('_APP_MESSAGE_SMS_TEST_DSN'));
|
||||
$to = $smsDSN->getParam('to');
|
||||
$from = $smsDSN->getParam('from');
|
||||
|
@ -1132,6 +1148,10 @@ class MessagingTest extends Scope
|
|||
|
||||
public function testSendPushNotification()
|
||||
{
|
||||
if (empty(App::getEnv('_APP_MESSAGE_PUSH_TEST_DSN'))) {
|
||||
$this->markTestSkipped('Push DSN empty');
|
||||
}
|
||||
|
||||
$pushDSN = new DSN(App::getEnv('_APP_MESSAGE_PUSH_TEST_DSN'));
|
||||
$to = $pushDSN->getParam('to');
|
||||
$serverKey = $pushDSN->getPassword();
|
||||
|
@ -1273,6 +1293,10 @@ class MessagingTest extends Scope
|
|||
*/
|
||||
public function testUpdatePushNotification(array $push)
|
||||
{
|
||||
if (empty(App::getEnv('_APP_MESSAGE_PUSH_TEST_DSN'))) {
|
||||
$this->markTestSkipped('Push DSN empty');
|
||||
}
|
||||
|
||||
$pushDSN = new DSN(App::getEnv('_APP_MESSAGE_PUSH_TEST_DSN'));
|
||||
$to = $pushDSN->getParam('to');
|
||||
$serverKey = $pushDSN->getPassword();
|
||||
|
|
|
@ -408,6 +408,10 @@ trait MessagingBase
|
|||
|
||||
public function testSendEmail()
|
||||
{
|
||||
if (empty(App::getEnv('_APP_MESSAGE_EMAIL_TEST_DSN'))) {
|
||||
$this->markTestSkipped('Email DSN not provided');
|
||||
}
|
||||
|
||||
$emailDSN = new DSN(App::getEnv('_APP_MESSAGE_EMAIL_TEST_DSN'));
|
||||
$to = $emailDSN->getParam('to');
|
||||
$from = $emailDSN->getParam('from');
|
||||
|
@ -519,6 +523,10 @@ trait MessagingBase
|
|||
*/
|
||||
public function testUpdateEmail(array $email)
|
||||
{
|
||||
if (empty(App::getEnv('_APP_MESSAGE_EMAIL_TEST_DSN'))) {
|
||||
$this->markTestSkipped('Email DSN not provided');
|
||||
}
|
||||
|
||||
$emailDSN = new DSN(App::getEnv('_APP_MESSAGE_EMAIL_TEST_DSN'));
|
||||
$to = $emailDSN->getParam('to');
|
||||
$from = $emailDSN->getParam('from');
|
||||
|
@ -645,6 +653,10 @@ trait MessagingBase
|
|||
|
||||
public function testSendSMS()
|
||||
{
|
||||
if (empty(App::getEnv('_APP_MESSAGE_SMS_TEST_DSN'))) {
|
||||
$this->markTestSkipped('SMS DSN not provided');
|
||||
}
|
||||
|
||||
$smsDSN = new DSN(App::getEnv('_APP_MESSAGE_SMS_TEST_DSN'));
|
||||
$to = $smsDSN->getParam('to');
|
||||
$from = $smsDSN->getParam('from');
|
||||
|
@ -753,6 +765,10 @@ trait MessagingBase
|
|||
*/
|
||||
public function testUpdateSMS(array $sms)
|
||||
{
|
||||
if (empty(App::getEnv('_APP_MESSAGE_SMS_TEST_DSN'))) {
|
||||
$this->markTestSkipped('SMS DSN not provided');
|
||||
}
|
||||
|
||||
$smsDSN = new DSN(App::getEnv('_APP_MESSAGE_SMS_TEST_DSN'));
|
||||
$to = $smsDSN->getParam('to');
|
||||
$from = $smsDSN->getParam('from');
|
||||
|
@ -876,6 +892,10 @@ trait MessagingBase
|
|||
|
||||
public function testSendPushNotification()
|
||||
{
|
||||
if (empty(App::getEnv('_APP_MESSAGE_PUSH_TEST_DSN'))) {
|
||||
$this->markTestSkipped('Push DSN empty');
|
||||
}
|
||||
|
||||
$pushDSN = new DSN(App::getEnv('_APP_MESSAGE_PUSH_TEST_DSN'));
|
||||
$to = $pushDSN->getParam('to');
|
||||
$serverKey = $pushDSN->getPassword();
|
||||
|
@ -981,6 +1001,10 @@ trait MessagingBase
|
|||
*/
|
||||
public function testUpdatePushNotification(array $push)
|
||||
{
|
||||
if (empty(App::getEnv('_APP_MESSAGE_PUSH_TEST_DSN'))) {
|
||||
$this->markTestSkipped('Push DSN empty');
|
||||
}
|
||||
|
||||
$pushDSN = new DSN(App::getEnv('_APP_MESSAGE_PUSH_TEST_DSN'));
|
||||
$to = $pushDSN->getParam('to');
|
||||
$serverKey = $pushDSN->getPassword();
|
||||
|
|
Loading…
Reference in a new issue