diff --git a/tests/CronBuilderTest.php b/tests/CronBuilderTest.php index 98d10d0..cbb2225 100644 --- a/tests/CronBuilderTest.php +++ b/tests/CronBuilderTest.php @@ -18,7 +18,7 @@ public function it_builds(): void $expected = << Generated by PHPUnit ### -0 0 * * * /usr/bin/php /home/johndoe/public_html/send-report.php --verbose # Run every day at midnight +0 0 * * * /usr/bin/php /home/johndoe/public_html/12/send-report.php --verbose # Run every day at midnight ###< Generated by PHPUnit ### CRON; @@ -38,8 +38,8 @@ public function it_builds_with_prod_env_set(): void $expected = << Generated by PHPUnit ### -0 0 * * * /usr/bin/php /home/johndoe/public_html/send-report.php --verbose # Run every day at midnight -0 0 * * * /usr/bin/php /home/johndoe/public_html/process.php --verbose +0 0 * * * /usr/bin/php /home/johndoe/public_html/12/send-report.php --verbose # Run every day at midnight +0 0 * * * /usr/bin/php /home/johndoe/public_html/12/process.php --verbose ###< Generated by PHPUnit ### CRON; @@ -58,7 +58,7 @@ public function it_merges(): void 0 0 * * * /usr/bin/php /home/johndoe/public_html/other-job.php ###> Generated by PHPUnit ### -0 0 * * * /usr/bin/php /home/johndoe/public_html/delete-files.php +0 0 * * * /usr/bin/php /home/johndoe/public_html/12/delete-files.php ###< Generated by PHPUnit ### @@ -70,7 +70,7 @@ public function it_merges(): void 0 0 * * * /usr/bin/php /home/johndoe/public_html/other-job.php ###> Generated by PHPUnit ### -0 0 * * * /usr/bin/php /home/johndoe/public_html/send-report.php --verbose # Run every day at midnight +0 0 * * * /usr/bin/php /home/johndoe/public_html/12/send-report.php --verbose # Run every day at midnight ###< Generated by PHPUnit ### CRON; diff --git a/tests/cronjobs/jobs.php b/tests/cronjobs/jobs.php index 8f449e7..db111d3 100644 --- a/tests/cronjobs/jobs.php +++ b/tests/cronjobs/jobs.php @@ -6,9 +6,9 @@ use Setono\CronBuilder\CronJob; return static function (Context $context): iterable { - yield new CronJob('0 0 * * *', '/usr/bin/php {{ release_path }}/send-report.php {{ args|join(" ") }}', 'Run every day at midnight'); + yield new CronJob('0 0 * * *', '/usr/bin/php {{ release_path }}/{{ release_number }}/send-report.php {{ args|join(" ") }}', 'Run every day at midnight'); if ($context->get('env') === 'prod') { - yield new CronJob('0 0 * * *', '/usr/bin/php {{ release_path }}/process.php {{ args|join(" ") }}'); + yield new CronJob('0 0 * * *', '/usr/bin/php {{ release_path }}/{{ release_number }}/process.php {{ args|join(" ") }}'); } };