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
diff options
context:
space:
mode:
authorStefan Giehl <stefan@piwik.org>2018-10-14 12:28:16 +0300
committerGitHub <noreply@github.com>2018-10-14 12:28:16 +0300
commit375184e5fc2d0cefb277b53e5ee653cd06cc7275 (patch)
tree49727acf7912d729784c78ed6b15df16b5b87f80
parent899c345169b3e38e7307a8b0766a53c1ef850754 (diff)
Fix FrontControllerTest for PHP7 (#13603)
-rw-r--r--tests/PHPUnit/Integration/FrontControllerTest.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/PHPUnit/Integration/FrontControllerTest.php b/tests/PHPUnit/Integration/FrontControllerTest.php
index f44eeccbeb..ff681d2cf5 100644
--- a/tests/PHPUnit/Integration/FrontControllerTest.php
+++ b/tests/PHPUnit/Integration/FrontControllerTest.php
@@ -50,6 +50,12 @@ FORMAT;
test message on {includePath}/tests/resources/trigger-fatal-exception.php(23)#0 [internal function]: {closure}('CoreHome', 'index', Array)#1 {includePath}/core/EventDispatcher.php(141): call_user_func_array(Object(Closure), Array)#2 {includePath}/core/Piwik.php(780): Piwik\EventDispatcher-&gt;postEvent('Request.dispatc...', Array, false, NULL)#3 {includePath}/core/FrontController.php(536): Piwik\Piwik::postEvent('Request.dispatc...', Array)#4 {includePath}/core/FrontController.php(144): Piwik\FrontController-&gt;doDispatch('CoreHome', 'index', NULL)#5 {includePath}/tests/resources/trigger-fatal-exception.php(31): Piwik\FrontController-&gt;dispatch('CoreHome', 'index')#6 {main}
FORMAT;
+ if (PHP_MAJOR_VERSION >= 7) {
+ $expectedFormat = <<<FORMAT
+test message on {includePath}/tests/resources/trigger-fatal-exception.php(23)#0 [internal function]: {closure}('CoreHome', 'index', Array)#1 {includePath}/core/EventDispatcher.php(141): call_user_func_array(Object(Closure), Array)#2 {includePath}/core/Piwik.php(780): Piwik\EventDispatcher-&gt;postEvent('Request.dispatc...', Array, false, Array)#3 {includePath}/core/FrontController.php(536): Piwik\Piwik::postEvent('Request.dispatc...', Array)#4 {includePath}/core/FrontController.php(144): Piwik\FrontController-&gt;doDispatch('CoreHome', 'index', Array)#5 {includePath}/tests/resources/trigger-fatal-exception.php(31): Piwik\FrontController-&gt;dispatch('CoreHome', 'index')#6 {main}
+FORMAT;
+ }
+
$this->assertStringMatchesFormat($expectedFormat, $response['message']);
}