File tree Expand file tree Collapse file tree 3 files changed +18
-9
lines changed Expand file tree Collapse file tree 3 files changed +18
-9
lines changed Original file line number Diff line number Diff line change @@ -113,9 +113,6 @@ public function testOutput()
113113
114114EOD;
115115
116- $ this ->expectOutputString ($ expected );
117- $ this ->setOutputCallback ([$ this , 'normalizeLineEndings ' ]);
118-
119116 if (empty (self ::$ phpcsFile ->ruleset ->tokenListeners )) {
120117 // PHPCSUtils 1.0.9+.
121118 $ sniffFile = \dirname (\dirname (__DIR__ )) . \DIRECTORY_SEPARATOR . 'Sniffs ' ;
@@ -127,7 +124,13 @@ public function testOutput()
127124 self ::$ phpcsFile ->ruleset ->populateTokenListeners ();
128125 }
129126
127+ \ob_start ();
130128 self ::$ phpcsFile ->process ();
129+
130+ $ output = \ob_get_contents ();
131+ \ob_end_clean ();
132+
133+ $ this ->assertSame ($ expected , $ this ->normalizeLineEndings ($ output ));
131134 }
132135
133136 /**
Original file line number Diff line number Diff line change @@ -133,9 +133,6 @@ public function testOutput()
133133
134134EOD;
135135
136- $ this ->expectOutputString ($ expected );
137- $ this ->setOutputCallback ([$ this , 'normalizeLineEndings ' ]);
138-
139136 if (empty (self ::$ phpcsFile ->ruleset ->tokenListeners )) {
140137 // PHPCSUtils 1.0.9+.
141138 $ sniffFile = \dirname (\dirname (__DIR__ )) . \DIRECTORY_SEPARATOR . 'Sniffs ' ;
@@ -147,7 +144,13 @@ public function testOutput()
147144 self ::$ phpcsFile ->ruleset ->populateTokenListeners ();
148145 }
149146
147+ \ob_start ();
150148 self ::$ phpcsFile ->process ();
149+
150+ $ output = \ob_get_contents ();
151+ \ob_end_clean ();
152+
153+ $ this ->assertSame ($ expected , $ this ->normalizeLineEndings ($ output ));
151154 }
152155
153156 /**
Original file line number Diff line number Diff line change @@ -106,9 +106,6 @@ public function testOutput()
106106
107107EOD;
108108
109- $ this ->expectOutputString ($ expected );
110- $ this ->setOutputCallback ([$ this , 'normalizeLineEndings ' ]);
111-
112109 if (empty (self ::$ phpcsFile ->ruleset ->tokenListeners )) {
113110 // PHPCSUtils 1.0.9+.
114111 $ sniffFile = \dirname (\dirname (__DIR__ )) . \DIRECTORY_SEPARATOR . 'Sniffs ' ;
@@ -120,7 +117,13 @@ public function testOutput()
120117 self ::$ phpcsFile ->ruleset ->populateTokenListeners ();
121118 }
122119
120+ \ob_start ();
123121 self ::$ phpcsFile ->process ();
122+
123+ $ output = \ob_get_contents ();
124+ \ob_end_clean ();
125+
126+ $ this ->assertSame ($ expected , $ this ->normalizeLineEndings ($ output ));
124127 }
125128
126129 /**
You can’t perform that action at this time.
0 commit comments