File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 11
11
use PHP_CodeSniffer \Ruleset ;
12
12
use PHP_CodeSniffer \Tests \ConfigDouble ;
13
13
use PHP_CodeSniffer \Tests \Core \Ruleset \AbstractRulesetTestCase ;
14
+ use PHP_CodeSniffer \Tests \Core \StatusWriterTestHelper ;
14
15
15
16
/**
16
17
* Tests that pre-defined standards do not throw errors.
19
20
*/
20
21
final class StandardRulesetsQATest extends AbstractRulesetTestCase
21
22
{
23
+ use StatusWriterTestHelper;
22
24
23
25
24
26
/**
@@ -36,15 +38,13 @@ final class StandardRulesetsQATest extends AbstractRulesetTestCase
36
38
*/
37
39
public function testBuildInStandardsDoNotContainErrors ($ standard )
38
40
{
39
- ob_start ();
41
+ $ this ->expectNoStdoutOutput ();
42
+
40
43
$ config = new ConfigDouble (["--standard= $ standard " ]);
41
44
$ ruleset = new Ruleset ($ config );
42
45
43
- $ seenOutput = ob_get_contents ();
44
- ob_end_clean ();
45
-
46
46
// Make sure no messages were thrown.
47
- $ this ->assertSame ('' , $ seenOutput );
47
+ $ this ->assertStderrOutputSameString ('' );
48
48
49
49
// Make sure sniffs were registered.
50
50
$ this ->assertGreaterThanOrEqual (1 , count ($ ruleset ->sniffCodes ));
You can’t perform that action at this time.
0 commit comments