11
11
use SebastianBergmann \GlobalState \Snapshot ;
12
12
use SebastianBergmann \GlobalState \Restorer ;
13
13
use SebastianBergmann \GlobalState \Blacklist ;
14
- use SebastianBergmann \RecursionContext \Context ;
15
14
use SebastianBergmann \Exporter \Exporter ;
16
15
use Prophecy \Exception \Prediction \PredictionException ;
17
16
use Prophecy \Prophet ;
@@ -1663,41 +1662,6 @@ public static function onConsecutiveCalls()
1663
1662
return new PHPUnit_Framework_MockObject_Stub_ConsecutiveCalls ($ args );
1664
1663
}
1665
1664
1666
- /**
1667
- * @param mixed $data The data to export as a string
1668
- * @param SebastianBergmann\RecursionContext\Context $processed Contains all objects and arrays that have previously been processed
1669
- * @return string
1670
- * @since Method available since Release 3.2.1
1671
- */
1672
- protected function dataToString (&$ data , $ processed = null )
1673
- {
1674
- $ result = array ();
1675
- $ exporter = new Exporter ();
1676
-
1677
- if (!$ processed ) {
1678
- $ processed = new Context ;
1679
- }
1680
-
1681
- $ processed ->add ($ data );
1682
-
1683
- foreach ($ data as $ key => $ value ) {
1684
- if (is_array ($ value )) {
1685
- if ($ processed ->contains ($ data [$ key ]) !== false ) {
1686
- $ result [] = '*RECURSION* ' ;
1687
- } else {
1688
- $ result [] = sprintf (
1689
- 'array(%s) ' ,
1690
- $ this ->dataToString ($ data [$ key ], $ processed )
1691
- );
1692
- }
1693
- } else {
1694
- $ result [] = $ exporter ->shortenedExport ($ value );
1695
- }
1696
- }
1697
-
1698
- return implode (', ' , $ result );
1699
- }
1700
-
1701
1665
/**
1702
1666
* Gets the data set description of a TestCase.
1703
1667
*
@@ -1716,8 +1680,10 @@ protected function getDataSetAsString($includeData = true)
1716
1680
$ buffer .= sprintf (' with data set "%s" ' , $ this ->dataName );
1717
1681
}
1718
1682
1683
+ $ exporter = new Exporter ;
1684
+
1719
1685
if ($ includeData ) {
1720
- $ buffer .= sprintf (' (%s) ' , $ this -> dataToString ($ this ->data ));
1686
+ $ buffer .= sprintf (' (%s) ' , $ exporter -> shortenedRecursiveExport ($ this ->data ));
1721
1687
}
1722
1688
}
1723
1689
0 commit comments