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