From ae36276cfc9ce2ecfb09be4d4c16e0b1b81901ee Mon Sep 17 00:00:00 2001 From: Andrey Zelenkov Date: Fri, 1 Mar 2019 18:58:16 +0300 Subject: Tests: made tests compatible with PHP 5.3. --- test/php/404/index.php | 8 +++++++- test/php/ini_precision/ini/php.ini | 1 + test/php/ini_precision/php.ini | 1 - test/test_php_application.py | 6 +++--- 4 files changed, 11 insertions(+), 5 deletions(-) create mode 100644 test/php/ini_precision/ini/php.ini delete mode 100644 test/php/ini_precision/php.ini (limited to 'test') diff --git a/test/php/404/index.php b/test/php/404/index.php index 92afdf19..561dbec2 100644 --- a/test/php/404/index.php +++ b/test/php/404/index.php @@ -1,4 +1,10 @@ diff --git a/test/php/ini_precision/ini/php.ini b/test/php/ini_precision/ini/php.ini new file mode 100644 index 00000000..51dbdede --- /dev/null +++ b/test/php/ini_precision/ini/php.ini @@ -0,0 +1 @@ +precision = 4 diff --git a/test/php/ini_precision/php.ini b/test/php/ini_precision/php.ini deleted file mode 100644 index 51dbdede..00000000 --- a/test/php/ini_precision/php.ini +++ /dev/null @@ -1 +0,0 @@ -precision = 4 diff --git a/test/test_php_application.py b/test/test_php_application.py index ac74359d..ddc3cad5 100644 --- a/test/test_php_application.py +++ b/test/test_php_application.py @@ -160,10 +160,10 @@ class TestUnitPHPApplication(unit.TestUnitApplicationPHP): self.assertNotEqual(self.get()['headers']['X-Precision'], '4', 'ini value default') - self.conf({"file": "php.ini"}, 'applications/ini_precision/options') + self.conf({"file": "ini/php.ini"}, 'applications/ini_precision/options') self.assertEqual(self.get()['headers']['X-File'], - self.current_dir + '/php/ini_precision/php.ini', 'ini file') + self.current_dir + '/php/ini_precision/ini/php.ini', 'ini file') self.assertEqual(self.get()['headers']['X-Precision'], '4', 'ini value') @unittest.expectedFailure @@ -200,7 +200,7 @@ class TestUnitPHPApplication(unit.TestUnitApplicationPHP): def test_php_application_ini_user_2(self): self.load('ini_precision') - self.conf({"file": "php.ini"}, 'applications/ini_precision/options') + self.conf({"file": "ini/php.ini"}, 'applications/ini_precision/options') self.assertEqual(self.get()['headers']['X-Precision'], '4', 'ini user file') -- cgit