Fix active coding standard rule violations in tests [MAILPOET-981]

This commit is contained in:
stoletniy
2017-07-03 16:20:44 +03:00
parent a49a230983
commit 29491dfd3e
13 changed files with 38 additions and 39 deletions

View File

@ -114,6 +114,7 @@ class SendingQueueTest extends MailPoetTest {
$sending_queue_worker->process(); $sending_queue_worker->process();
self::fail('Execution limits function was not called.'); self::fail('Execution limits function was not called.');
} catch(\Exception $e) { } catch(\Exception $e) {
// No exception handling needed
} }
} }

View File

@ -1,4 +1,3 @@
<?php <?php
use Carbon\Carbon; use Carbon\Carbon;
@ -324,7 +323,7 @@ class NewsletterSchedulerTest extends MailPoetTest {
'monthDay' => null, 'monthDay' => null,
'nthWeekDay' => null, 'nthWeekDay' => null,
'weekDay' => null, 'weekDay' => null,
'timeOfDay' => 50400 // 14:00 'timeOfDay' => 50400 // 2 p.m.
); );
Scheduler::processPostNotificationSchedule($newsletter); Scheduler::processPostNotificationSchedule($newsletter);
$newsletter_option = NewsletterOption::where('newsletter_id', $newsletter->id) $newsletter_option = NewsletterOption::where('newsletter_id', $newsletter->id)
@ -341,7 +340,7 @@ class NewsletterSchedulerTest extends MailPoetTest {
'monthDay' => null, 'monthDay' => null,
'nthWeekDay' => null, 'nthWeekDay' => null,
'weekDay' => Carbon::TUESDAY, 'weekDay' => Carbon::TUESDAY,
'timeOfDay' => 50400 // 14:00 'timeOfDay' => 50400 // 2 p.m.
); );
Scheduler::processPostNotificationSchedule($newsletter); Scheduler::processPostNotificationSchedule($newsletter);
$current_time = Carbon::createFromTimestamp(current_time('timestamp')); $current_time = Carbon::createFromTimestamp(current_time('timestamp'));
@ -359,7 +358,7 @@ class NewsletterSchedulerTest extends MailPoetTest {
'monthDay' => 19, // 20th (count starts from 0) 'monthDay' => 19, // 20th (count starts from 0)
'nthWeekDay' => null, 'nthWeekDay' => null,
'weekDay' => null, 'weekDay' => null,
'timeOfDay' => 50400 // 14:00 'timeOfDay' => 50400 // 2 p.m.
); );
Scheduler::processPostNotificationSchedule($newsletter); Scheduler::processPostNotificationSchedule($newsletter);
$newsletter_option = NewsletterOption::where('newsletter_id', $newsletter->id) $newsletter_option = NewsletterOption::where('newsletter_id', $newsletter->id)
@ -376,7 +375,7 @@ class NewsletterSchedulerTest extends MailPoetTest {
'monthDay' => null, 'monthDay' => null,
'nthWeekDay' => 'L', // L = last 'nthWeekDay' => 'L', // L = last
'weekDay' => Carbon::SATURDAY, 'weekDay' => Carbon::SATURDAY,
'timeOfDay' => 50400 // 14:00 'timeOfDay' => 50400 // 2 p.m.
); );
Scheduler::processPostNotificationSchedule($newsletter); Scheduler::processPostNotificationSchedule($newsletter);
$newsletter_option = NewsletterOption::where('newsletter_id', $newsletter->id) $newsletter_option = NewsletterOption::where('newsletter_id', $newsletter->id)

View File

@ -143,8 +143,7 @@ class ExportTest extends MailPoetTest {
'|' . '|' .
preg_quote(Env::$temp_url, '|') . '/' . preg_quote(Env::$temp_url, '|') . '/' .
basename($this->export->export_file) . basename($this->export->export_file) .
'|' '|', $this->export->export_file_URL)
, $this->export->export_file_URL)
)->equals(1); )->equals(1);
expect($this->export->subscriber_batch_size)->notNull(); expect($this->export->subscriber_batch_size)->notNull();
} }