diff --git a/src/Utilities/Miscellaneous.php b/src/Utilities/Miscellaneous.php index 57ae076..283e929 100644 --- a/src/Utilities/Miscellaneous.php +++ b/src/Utilities/Miscellaneous.php @@ -296,34 +296,6 @@ class Miscellaneous return $effect; } - /** - * Displays variable content as preformatted text (fixed-width font and preserves both spaces and line breaks) - * - * If xdebug php module is loaded, displays variable using var_dump(), otherwise
var_dump()
. - * You can pass as many variables as you wish. - * - * Pass each variable as argument of this function. Amount unlimited. Variables are loaded using the - * func_get_args() function (@see http://pl1.php.net/manual/en/function.func-get-args.php). - */ - public static function variableDump() - { - $xdebugLoaded = self::isPhpModuleLoaded('xdebug'); - - if (!$xdebugLoaded) { - echo '
';
-        }
-
-        $arguments = func_get_args();
-
-        foreach ($arguments as $argument) {
-            var_dump($argument);
-        }
-
-        if (!$xdebugLoaded) {
-            echo '
'; - } - } - /** * Returns information if given PHP module is compiled and loaded * diff --git a/tests/Utilities/MiscellaneousTest.php b/tests/Utilities/MiscellaneousTest.php index aa54c6a..c5cfed2 100644 --- a/tests/Utilities/MiscellaneousTest.php +++ b/tests/Utilities/MiscellaneousTest.php @@ -156,33 +156,6 @@ class MiscellaneousTest extends BaseTestCase self::assertFalse(Miscellaneous::isPhpModuleLoaded('xyz123')); } - public function testVariableDump() - { - $xdebugLoaded = Miscellaneous::isPhpModuleLoaded('xdebug'); - - $variable = 123; - $expected = "int(123)\n"; - - if ($xdebugLoaded) { - $libraryPath = realpath(sprintf('%s%s', __DIR__, '/../..')); - $filePath = sprintf('%s%s', $libraryPath, '/src/Utilities/Miscellaneous.php:'); - - /* - * Attention. I have to use "\d+" at the end of $filePath, because number of line may be different if new - * method / function will be created. - */ - $filePathQuoted = sprintf('%s\d+\:', preg_quote($filePath, '/')); - - $expectedPattern = sprintf("/%s\n%s/", $filePathQuoted, preg_quote($expected, '/')); - $this->expectOutputRegex($expectedPattern); - } else { - $expected = sprintf('
%s
', $expected); - $this->expectOutputString($expected); - } - - Miscellaneous::variableDump($variable); - } - /** * @param mixed $string Empty value, e.g. "" * @dataProvider provideEmptyValue