- if (PHP_VERSION_ID >= 50400) {
- $this->assertSame("DumpDataCollectorTest.php on line {$line}:\n456\n", ob_get_clean());
+ $output = preg_replace("/\033\[[^m]*m/", '', ob_get_clean());
+ $this->assertSame("DumpDataCollectorTest.php on line {$line}:\n456\n", $output);
+ }
+
+ public function testFlushNothingWhenDataDumperIsProvided()
+ {
+ $data = new Data(array(array(456)));
+ $dumper = new CliDumper('php://output');
+ $collector = new DumpDataCollector(null, null, null, null, $dumper);
+
+ ob_start();
+ $collector->dump($data);
+ $line = __LINE__ - 1;
+ $output = preg_replace("/\033\[[^m]*m/", '', ob_get_clean());
+ if (\PHP_VERSION_ID >= 50400) {
+ $this->assertSame("DumpDataCollectorTest.php on line {$line}:\n456\n", $output);