From 7730dbebab54e6533a30f93c43311039b89c5760 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 12 Feb 2016 00:09:23 +0200 Subject: Skip CI_Log tests on PHP 5.2 We still run those (with failures enabled) and that test breaks them --- tests/codeigniter/core/Log_test.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'tests/codeigniter/core/Log_test.php') diff --git a/tests/codeigniter/core/Log_test.php b/tests/codeigniter/core/Log_test.php index d44cbac0f..2dd9d90d2 100644 --- a/tests/codeigniter/core/Log_test.php +++ b/tests/codeigniter/core/Log_test.php @@ -1,9 +1,13 @@ markTestSkipped("PHP 5.2 doesn't have ReflectionProperty::setAccessible() and can't run this test"); + } + $path = new ReflectionProperty('CI_Log', '_log_path'); $path->setAccessible(TRUE); $threshold = new ReflectionProperty('CI_Log', '_threshold'); @@ -50,6 +54,11 @@ class Log_test extends CI_TestCase { public function test_format_line() { + if ( ! is_php('5.3')) + { + return $this->markTestSkipped("PHP 5.2 doesn't have ReflectionProperty::setAccessible() and can't run this test"); + } + $this->ci_set_config('log_path', ''); $this->ci_set_config('log_threshold', 0); $instance = new CI_Log(); -- cgit v1.2.3-24-g4f1b