diff --git a/tests/modules/cron/lib/Controller/CronTest.php b/tests/modules/cron/lib/Controller/CronTest.php index e543a6dad2125b956e817032cb3b740309e68bc1..350b19eeef29081f723eb918b00b466b502fa774 100644 --- a/tests/modules/cron/lib/Controller/CronTest.php +++ b/tests/modules/cron/lib/Controller/CronTest.php @@ -84,6 +84,14 @@ class CronTest extends TestCase $response = $c->info(); $this->assertTrue($response->isSuccessful()); + $expect = [ + 'exec_href' => 'http://localhost/simplesaml/module.php/cron/run/daily/secret', + 'href' => 'http://localhost/simplesaml/module.php/cron/run/daily/secret/xhtml', + 'tag' => 'daily', + 'int' => '02 0 * * *', + ]; + $this->assertCount(1, $response->data['urls']); + $this->assertEquals($expect, $response->data['urls'][0]); } @@ -97,5 +105,10 @@ class CronTest extends TestCase $response = $c->run('daily', 'secret'); $this->assertTrue($response->isSuccessful()); + $this->assertEquals('daily', $response->data['tag']); + $this->assertFalse($response->data['mail_required']); + $this->assertArrayHasKey('time', $response->data); + $this->assertCount(1, $response->data['summary']); + $this->assertEquals('Cron did run tag [daily] at ' . $response->data['time'], $response->data['summary'][0]); } }