1 | <?php |
||
2 | |||
3 | namespace Zenstruck\ScheduleBundle\Tests\Schedule\Task; |
||
4 | |||
5 | use PHPUnit\Framework\TestCase; |
||
0 ignored issues
–
show
|
|||
6 | use Symfony\Component\Process\Process; |
||
7 | use Zenstruck\ScheduleBundle\Schedule\Task\ProcessTask; |
||
8 | |||
9 | /** |
||
10 | * @author Kevin Bond <[email protected]> |
||
11 | */ |
||
12 | final class ProcessTaskTest extends TestCase |
||
13 | { |
||
14 | /** |
||
15 | * @test |
||
16 | */ |
||
17 | public function has_default_description() |
||
18 | { |
||
19 | $this->assertSame('$(which php) -v', (new ProcessTask('$(which php) -v'))->getDescription()); |
||
20 | $this->assertSame('$(which php) -v', (new ProcessTask(Process::fromShellCommandline('$(which php) -v')))->getDescription()); |
||
21 | } |
||
22 | |||
23 | /** |
||
24 | * @test |
||
25 | */ |
||
26 | public function task_has_context() |
||
27 | { |
||
28 | $task = new ProcessTask('/foo/bar'); |
||
29 | $this->assertSame(['Command Line' => '/foo/bar', 'Command Timeout' => '60'], $task->getContext()); |
||
30 | |||
31 | $task = new ProcessTask(Process::fromShellCommandline('/foo/bar')->setTimeout(30)); |
||
32 | $this->assertSame(['Command Line' => '/foo/bar', 'Command Timeout' => '30'], $task->getContext()); |
||
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