-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathControlSignatureSniffTest.php
More file actions
37 lines (30 loc) · 1.27 KB
/
ControlSignatureSniffTest.php
File metadata and controls
37 lines (30 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php declare(strict_types=1);
namespace StefnaTest\Sniffs\ControlStructures;
use StefnaTest\Sniffs\TestCase;
class ControlSignatureSniffTest extends TestCase
{
public function testNoErrors(): void
{
$report = $this->checkFile('OK');
self::assertNoSniffErrorInFile($report);
}
public function testFixErrors(): void
{
$report = $this->checkFile('Bad');
self::assertSniffError($report, 3, 'NewlineAfterOpenBrace');
self::assertSniffError($report, 3, 'NewlineAfterOpenBrace');
self::assertSniffError($report, 3, 'SpaceAfterCloseBrace');
self::assertSniffError($report, 5, 'NewlineAfterOpenBrace');
self::assertSniffError($report, 7, 'NewlineAfterOpenBrace');
self::assertSniffError($report, 9, 'NewlineAfterOpenBrace');
self::assertSniffError($report, 11, 'NewlineAfterOpenBrace');
self::assertSniffError($report, 13, 'NewlineAfterOpenBrace');
self::assertSniffError($report, 13, 'NewlineAfterOpenBrace');
self::assertSniffError($report, 13, 'NewlineAfterOpenBrace');
self::assertSniffError($report, 15, 'NewlineAfterOpenBrace');
self::assertSniffError($report, 17, 'NewlineAfterOpenBrace');
self::assertSniffError($report, 19, 'NewlineAfterOpenBrace');
self::assertSniffError($report, 21, 'NewlineAfterOpenBrace');
self::assertAllFixedInFile($report);
}
}