Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLukas Winkler <git@lw1.at>2020-08-24 01:01:47 +0300
committerGitHub <noreply@github.com>2020-08-24 01:01:47 +0300
commit61c27749b1af2a330fa5c2b94f30adaaa871a920 (patch)
tree28048373a20f74755c6936a738f5d4fa11a7bbb7 /tests
parent8dfe273a96f681d0f8c6d1491bdd206cbaf8c04b (diff)
Tests no memory limit (#16314)
* don't run test-command-with-exception if php-cli has no memory_limit * use correct function
Diffstat (limited to 'tests')
-rw-r--r--tests/PHPUnit/System/ConsoleTest.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/PHPUnit/System/ConsoleTest.php b/tests/PHPUnit/System/ConsoleTest.php
index 34a76bcbf9..25b7f164a2 100644
--- a/tests/PHPUnit/System/ConsoleTest.php
+++ b/tests/PHPUnit/System/ConsoleTest.php
@@ -145,6 +145,16 @@ class ConsoleTest extends ConsoleCommandTestCase
public function test_Console_handlesFatalErrorsCorrectly()
{
+ $cliPhp = new CliPhp();
+ $php = $cliPhp->findPhpBinary();
+ $command = $php . " -i | grep 'memory_limit => -1'";
+
+ $output = shell_exec($command);
+
+ if ($output == "memory_limit => -1 => -1\n") {
+ $this->markTestSkipped("no memory limit in php-cli");
+ }
+
$command = Fixture::getCliCommandBase();
$command .= ' test-command-with-fatal-error';
$command .= ' 2>&1';
@@ -229,4 +239,4 @@ END;
$output = preg_replace('/[0-9]+ bytes/', 'X bytes', $output);
return $output;
}
-} \ No newline at end of file
+}