1
0
Fork 0
mirror of synced 2024-10-02 10:16:27 +13:00

adds test skip condition if dsn not provided

This commit is contained in:
prateek banga 2023-10-31 02:34:18 +05:30
parent 0dafc59cc2
commit a4c8d852a5
4 changed files with 56 additions and 0 deletions

View file

@ -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');

View file

@ -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');

View file

@ -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();

View file

@ -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();