@@ -67,7 +67,7 @@ public function testCollectDefault()
67
67
68
68
ob_start ();
69
69
$ collector ->collect (new Request (), new Response ());
70
- $ output = ob_get_clean ();
70
+ $ output = preg_replace ( " / \033 \[[^m]*m/ " , '' , ob_get_clean () );
71
71
72
72
if (\PHP_VERSION_ID >= 50400 ) {
73
73
$ this ->assertSame ("DumpDataCollectorTest.php on line {$ line }: \n123 \n" , $ output );
@@ -125,10 +125,11 @@ public function testFlush()
125
125
126
126
ob_start ();
127
127
$ collector ->__destruct ();
128
+ $ output = preg_replace ("/ \033\[[^m]*m/ " , '' , ob_get_clean ());
128
129
if (\PHP_VERSION_ID >= 50400 ) {
129
- $ this ->assertSame ("DumpDataCollectorTest.php on line {$ line }: \n456 \n" , ob_get_clean () );
130
+ $ this ->assertSame ("DumpDataCollectorTest.php on line {$ line }: \n456 \n" , $ output );
130
131
} else {
131
- $ this ->assertSame ("\"DumpDataCollectorTest.php on line {$ line }: \"\n456 \n" , ob_get_clean () );
132
+ $ this ->assertSame ("\"DumpDataCollectorTest.php on line {$ line }: \"\n456 \n" , $ output );
132
133
}
133
134
}
134
135
@@ -141,10 +142,11 @@ public function testFlushNothingWhenDataDumperIsProvided()
141
142
ob_start ();
142
143
$ collector ->dump ($ data );
143
144
$ line = __LINE__ - 1 ;
145
+ $ output = preg_replace ("/ \033\[[^m]*m/ " , '' , ob_get_clean ());
144
146
if (\PHP_VERSION_ID >= 50400 ) {
145
- $ this ->assertSame ("DumpDataCollectorTest.php on line {$ line }: \n456 \n" , ob_get_clean () );
147
+ $ this ->assertSame ("DumpDataCollectorTest.php on line {$ line }: \n456 \n" , $ output );
146
148
} else {
147
- $ this ->assertSame ("\"DumpDataCollectorTest.php on line {$ line }: \"\n456 \n" , ob_get_clean () );
149
+ $ this ->assertSame ("\"DumpDataCollectorTest.php on line {$ line }: \"\n456 \n" , $ output );
148
150
}
149
151
150
152
ob_start ();
0 commit comments