We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
1 | <?php declare(strict_types=1); |
||
2 | |||
3 | namespace SmrTest; |
||
4 | |||
5 | use Overtrue\PHPLint\Linter; |
||
6 | use PHPUnit\Framework\TestCase; |
||
7 | |||
8 | /** |
||
9 | * @coversNothing |
||
10 | */ |
||
11 | class PhpFileInspectionTest extends TestCase { |
||
12 | |||
13 | public function test_all_files_use_strict_type(): void { |
||
14 | $exit_code = 1; |
||
15 | $output = []; |
||
16 | exec(ROOT . 'test/strict_types.sh', $output, $exit_code); |
||
17 | $this->assertSame(0, $exit_code, implode("\n", $output)); |
||
18 | $this->assertEquals('Success! No strict_type errors.', end($output)); |
||
19 | } |
||
20 | |||
21 | public function test_all_files_pass_phplint(): void { |
||
22 | $paths = [ROOT]; |
||
23 | $excludes = ['vendor']; |
||
24 | $linter = new Linter($paths, $excludes, warning: true); |
||
25 | $linter->setProcessLimit(8); // multiprocessing |
||
26 | |||
27 | // get errors |
||
28 | $errors = $linter->lint(); |
||
29 | $this->assertEmpty($errors, print_r($errors, true)); |
||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||
30 | } |
||
31 | |||
32 | } |
||
33 |