Skip to content

Commit

Permalink
Added test for ignored files
Browse files Browse the repository at this point in the history
  • Loading branch information
butschster committed Sep 8, 2021
1 parent 241ff70 commit ffedce6
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion tests/CodeStyle/CodeStyleCheckTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ public function testWrongFormattedClass(): void

public function testWellFormattedClass(): void
{

$out = $this->execCommand([
'bin/spiral-cs',
'check',
Expand All @@ -37,4 +36,17 @@ public function testWellFormattedClass(): void
$this->assertArrayHasKey(0, $out);
$this->assertEquals($out[0], 'No codestyle issues');
}

public function testIgnoredFilesShouldBeSkipped()
{
$out = $this->execCommand([
'bin/spiral-cs',
'check',
'--ignore=NotFormattedClass.php',
'tests/fixtures/temp/'
]);

$this->assertArrayHasKey(0, $out);
$this->assertEquals($out[0], 'No codestyle issues');
}
}

0 comments on commit ffedce6

Please sign in to comment.