silverstripe /
cwp-pdfexport
| 1 | <?php |
||
| 2 | |||
| 3 | namespace CWP\PDFExport\Tests\Tasks; |
||
| 4 | |||
| 5 | use CWP\PDFExport\Tasks\CleanupGeneratedPdfDailyTask; |
||
| 6 | use SilverStripe\Core\Config\Config; |
||
| 7 | use SilverStripe\CronTask\Interfaces\CronTask; |
||
|
0 ignored issues
–
show
|
|||
| 8 | use SilverStripe\Dev\SapphireTest; |
||
| 9 | |||
| 10 | class CleanupGeneratedPdfDailyTaskTest extends SapphireTest |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var CleanupGeneratedPdfDailyTask |
||
| 14 | */ |
||
| 15 | protected $task; |
||
| 16 | |||
| 17 | protected function setUp() |
||
| 18 | { |
||
| 19 | parent::setUp(); |
||
| 20 | |||
| 21 | if (!interface_exists(CronTask::class)) { |
||
| 22 | $this->markTestSkipped('Test class requires the silverstripe/crontask module to be installed'); |
||
| 23 | } |
||
| 24 | |||
| 25 | $this->task = new CleanupGeneratedPdfDailyTask(); |
||
| 26 | } |
||
| 27 | |||
| 28 | public function testCronScheduleIsConfigurable() |
||
| 29 | { |
||
| 30 | Config::modify()->set(CleanupGeneratedPdfDailyTask::class, 'schedule', '* 1 2 3 *'); |
||
| 31 | |||
| 32 | $this->assertSame('* 1 2 3 *', $this->task->getSchedule()); |
||
| 33 | } |
||
| 34 | } |
||
| 35 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths