File tree Expand file tree Collapse file tree 2 files changed +20
-2
lines changed
Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Original file line number Diff line number Diff line change 7676
7777 \file_put_contents (getcwd ().DIRECTORY_SEPARATOR .'.pa.yml ' , $ yamlContent );
7878
79- $ this ->assertFileExists (getcwd ().DIRECTORY_SEPARATOR .'.pa.yml ' );
80-
8179 $ this ->artisan ('analyse ' .$ this ->temporaryDirectory )->assertExitCode (Command::SUCCESS );
8280 $ this ->artisan ('analyse ' .$ this ->temporaryDirectory .' --configuration=.pa.yml ' )->expectsOutputToContain ('Using configuration ' );
8381
8482 \unlink (getcwd ().DIRECTORY_SEPARATOR .'.pa.yml ' );
8583});
8684
85+ it ('analyses successfully with omitted steps ' , function () {
86+ setUpCompletePackage ($ this ->temporaryDirectory );
87+ rmdir ($ this ->temporaryDirectory .DIRECTORY_SEPARATOR .'bin ' );
88+
89+ $ yamlContent = <<<'YAML'
90+ stepsToOmit:
91+ - cli-binary
92+ YAML;
93+
94+ \file_put_contents (getcwd ().DIRECTORY_SEPARATOR .'.pa.yml ' , $ yamlContent );
95+
96+ $ this ->artisan ('analyse ' .$ this ->temporaryDirectory )->assertExitCode (Command::SUCCESS );
97+ $ this ->artisan ('analyse ' .$ this ->temporaryDirectory )->expectsOutputToContain ('Omitted 1 analyse step ' );
98+
99+ \unlink (getcwd ().DIRECTORY_SEPARATOR .'.pa.yml ' );
100+ });
101+
87102function setUpCompletePackage (string $ temporaryDirectory ): void
88103{
89104 \touch ($ temporaryDirectory .DIRECTORY_SEPARATOR .'.gitignore ' );
Original file line number Diff line number Diff line change 55use App \Exceptions \InvalidConfiguration ;
66
77test ('it detects non available and available configuration ' , function () {
8+ if (file_exists (getcwd ().DIRECTORY_SEPARATOR .'.pa.yml ' )) {
9+ unlink (getcwd ().DIRECTORY_SEPARATOR .'.pa.yml ' );
10+ }
811 $ configuration = new Configuration (new PackageAnalyser (getcwd ()));
912
1013 expect ($ configuration ->hasConfiguration ())->toBeFalse ();
You can’t perform that action at this time.
0 commit comments