From c019e7cac2eb4d852b4aec8473fff26757436fcd Mon Sep 17 00:00:00 2001 From: David Grudl Date: Thu, 21 Jul 2016 14:28:58 +0200 Subject: [PATCH] tests: fixed compatibility with PHP 7.1 --- tests/dibi/Result.normalize.phpt | 2 +- tests/dibi/Translator.phpt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/dibi/Result.normalize.phpt b/tests/dibi/Result.normalize.phpt index 68b87ada..b7521cc1 100644 --- a/tests/dibi/Result.normalize.phpt +++ b/tests/dibi/Result.normalize.phpt @@ -139,7 +139,7 @@ test(function () { Assert::same(['col' => 1], $result->test(['col' => TRUE])); Assert::same(['col' => 0], $result->test(['col' => FALSE])); - Assert::same(['col' => 0], $result->test(['col' => ''])); + Assert::same(['col' => 0], @$result->test(['col' => ''])); // triggers warning in PHP 7.1 Assert::same(['col' => 0], $result->test(['col' => '0'])); Assert::same(['col' => 1], $result->test(['col' => '1'])); Assert::same(['col' => 10], $result->test(['col' => '10'])); diff --git a/tests/dibi/Translator.phpt b/tests/dibi/Translator.phpt index 5f760125..746c8895 100644 --- a/tests/dibi/Translator.phpt +++ b/tests/dibi/Translator.phpt @@ -522,7 +522,7 @@ Assert::same( Assert::same( reformat('INSERT INTO 0'), - $conn->translate('INSERT INTO %f', 'ahoj') + @$conn->translate('INSERT INTO %f', 'ahoj') // triggers warning in PHP 7.1 );