1111use SebastianBergmann \GlobalState \Snapshot ;
1212use SebastianBergmann \GlobalState \Restorer ;
1313use SebastianBergmann \GlobalState \Blacklist ;
14- use SebastianBergmann \RecursionContext \Context ;
1514use SebastianBergmann \Exporter \Exporter ;
1615use Prophecy \Exception \Prediction \PredictionException ;
1716use Prophecy \Prophet ;
@@ -1665,45 +1664,6 @@ public static function onConsecutiveCalls()
16651664 return new PHPUnit_Framework_MockObject_Stub_ConsecutiveCalls ($ args );
16661665 }
16671666
1668- /**
1669- * @param mixed $data The data to export as a string
1670- * @param SebastianBergmann\RecursionContext\Context $processed Contains all objects and arrays that have previously been processed
1671- * @return string
1672- * @since Method available since Release 3.2.1
1673- */
1674- protected function dataToString (&$ data , $ processed = null )
1675- {
1676- $ result = array ();
1677- $ exporter = new Exporter ();
1678-
1679- if (!$ processed ) {
1680- $ processed = new Context ;
1681- }
1682-
1683- $ processed ->add ($ data );
1684-
1685- foreach ($ data as $ key => $ value ) {
1686- if (is_array ($ value )) {
1687- if ($ processed ->contains ($ data [$ key ]) !== false ) {
1688- $ result [] = '*RECURSION* ' ;
1689- }
1690-
1691- else {
1692- $ result [] = sprintf (
1693- 'array(%s) ' ,
1694- $ this ->dataToString ($ data [$ key ], $ processed )
1695- );
1696- }
1697- }
1698-
1699- else {
1700- $ result [] = $ exporter ->shortenedExport ($ value );
1701- }
1702- }
1703-
1704- return join (', ' , $ result );
1705- }
1706-
17071667 /**
17081668 * Gets the data set description of a TestCase.
17091669 *
@@ -1722,8 +1682,10 @@ protected function getDataSetAsString($includeData = true)
17221682 $ buffer .= sprintf (' with data set "%s" ' , $ this ->dataName );
17231683 }
17241684
1685+ $ exporter = new Exporter ;
1686+
17251687 if ($ includeData ) {
1726- $ buffer .= sprintf (' (%s) ' , $ this -> dataToString ($ this ->data ));
1688+ $ buffer .= sprintf (' (%s) ' , $ exporter -> shortenedRecursiveExport ($ this ->data ));
17271689 }
17281690 }
17291691
0 commit comments