Source of file SecurityAlertCheckJobTest.php
Size: 0,788 Bytes - Last Modified: 2021-12-23T10:37:58+00:00
/var/www/docs.ssmods.com/process/src/tests/SecurityAlertCheckJobTest.php
123456789101112131415161718192021222324252627282930 | <?php namespace BringYourOwnIdeas\SecurityChecker\Tests; use BringYourOwnIdeas\SecurityChecker\Jobs\SecurityAlertCheckJob; use BringYourOwnIdeas\SecurityChecker\Tasks\SecurityAlertCheckTask; use SilverStripe\Dev\SapphireTest; use Symbiote\QueuedJobs\Services\QueuedJobService; class SecurityAlertCheckJobTest extends SapphireTest { protected function setUp() { parent::setUp(); QueuedJobService::config()->set('use_shutdown_function', false); } public function testJobCallsTask() { $spy = $this->getMockBuilder(SecurityAlertCheckTask::class)->setMethods(['run'])->getMock(); $spy->expects($this->once())->method('run'); $job = new SecurityAlertCheckJob; $job->setCheckTask($spy); $job->process(); } } |