예제 #1
0
 public function cron($command)
 {
     if ($command == 'unapproved-hour-notifications') {
         $n = Organization::processUnapprovedNotifications();
         echo "--- Sent {$n} notifications\n";
         return true;
     }
 }
예제 #2
0
 /**
  * @depends testOrgsWithUnapprovedHourNotifications
  */
 public function testProcessUnapprovedNotifications()
 {
     $this->assertEquals(1, Organization::processUnapprovedNotifications());
     self::$org->load();
     $this->assertEquals(0, self::$org->unapproved_hours_notify_count);
 }