Beispiel #1
0
 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function handle()
 {
     $this->info('Getting ready to send alerts.');
     $range = $this->argument('minutes');
     $handler = new AlertHandler();
     $status = $handler->sendAlertEmails($range);
     $this->info($status);
 }
 /**
  * @Then the alert handler should send an email
  */
 public function theAlertHandlerShouldSendAnEmail()
 {
     $handler = new AlertHandler(new Curl());
     $stats = $handler->sendAlertEmails(env('ALERT_FETCH_RANGE'));
     print $stats;
     PHPUnit::assertGreaterThan(0, $stats);
 }