<?php it('may fail with style issues', function () { [$statusCode, $output] = run('default', [ 'path' => base_path('tests/Fixtures/with-fixable-issues'), '--preset' => 'psr12', ]); expect($statusCode)->toBe(1) ->and($output) ->toContain('FAIL') ->toContain('1 file, 1 style issue') ->toContain(sprintf('⨯ %s', implode(DIRECTORY_SEPARATOR, [ 'tests', 'Fixtures', 'with-fixable-issues', 'file.php', ])))->toContain('new_with_braces'); }); it('may fail with errors', function () { [$statusCode, $output] = run('default', [ 'path' => base_path('tests/Fixtures/with-non-fixable-issues'), ]); expect($statusCode)->toBe(1) ->and($output) ->toContain('FAIL') ->toContain('1 file, 1 error') ->toContain(sprintf('! %s', implode(DIRECTORY_SEPARATOR, [ 'tests', 'Fixtures', 'with-non-fixable-issues', 'file.php', ])))->toContain('Parse error: syntax error'); }); it('may pass', function () { [$statusCode, $output] = run('default', [ 'path' => base_path('tests/Fixtures/without-issues'), ]); expect($statusCode)->toBe(0) ->and($output) ->toContain('PASS'); });
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
Fixers | Folder | 0755 |
|
|
ConfigurationTest.php | File | 315 B | 0644 |
|
DirtyTest.php | File | 1.54 KB | 0644 |
|
FormatTest.php | File | 2.64 KB | 0644 |
|
PresetTest.php | File | 1.18 KB | 0644 |
|
ProgressTest.php | File | 957 B | 0644 |
|
SummaryTest.php | File | 1.25 KB | 0644 |
|
VerboseTest.php | File | 364 B | 0644 |
|