diff options
author | Andrey Zelenkov <zelenkov@nginx.com> | 2018-06-07 21:13:55 +0300 |
---|---|---|
committer | Andrey Zelenkov <zelenkov@nginx.com> | 2018-06-07 21:13:55 +0300 |
commit | 2b39ed5dfb56fa01e38ee8540973f4eb42a1ff82 (patch) | |
tree | 67011675a55f37f61e7ee2d630f3912486c93f86 /test/test_php_application.py | |
parent | 0f0fb35620280f5eb9df041772a9454e2d51e0f0 (diff) | |
download | unit-2b39ed5dfb56fa01e38ee8540973f4eb42a1ff82.tar.gz unit-2b39ed5dfb56fa01e38ee8540973f4eb42a1ff82.tar.bz2 |
Tests: added tests for "precision" option in php.ini.
Diffstat (limited to 'test/test_php_application.py')
-rw-r--r-- | test/test_php_application.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/test_php_application.py b/test/test_php_application.py index 9ac063c7..37467019 100644 --- a/test/test_php_application.py +++ b/test/test_php_application.py @@ -118,5 +118,17 @@ class TestUnitPHPApplication(unit.TestUnitApplicationPHP): self.assertEqual(resp['headers']['X-Cookie-1'], 'val', 'cookie') self.assertEqual(resp['headers']['X-Cookie-2'], 'val2', 'cookie') + def test_php_application_ini_precision(self): + self.load('ini_precision') + + self.assertNotEqual(self.get()['headers']['X-Precision'], '4', + 'ini value default') + + self.conf({"file": "php.ini"}, '/applications/ini_precision/options') + + self.assertEqual(self.get()['headers']['X-File'], + self.current_dir + '/php/ini_precision/php.ini', 'ini file') + self.assertEqual(self.get()['headers']['X-Precision'], '4', 'ini value') + if __name__ == '__main__': unittest.main() |