summaryrefslogtreecommitdiffstats
path: root/tests/codeigniter
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2016-02-11 23:09:23 +0100
committerAndrey Andreev <narf@devilix.net>2016-02-11 23:09:23 +0100
commit7730dbebab54e6533a30f93c43311039b89c5760 (patch)
treeffb128a1071ebcd99769b08a10117142adee34eb /tests/codeigniter
parent9198ad04ba27803ce9f924bbd753fad36122fb5a (diff)
Skip CI_Log tests on PHP 5.2
We still run those (with failures enabled) and that test breaks them
Diffstat (limited to 'tests/codeigniter')
-rw-r--r--tests/codeigniter/core/Log_test.php11
1 files changed, 10 insertions, 1 deletions
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 @@
<?php
-
class Log_test extends CI_TestCase {
public function test_configuration()
{
+ if ( ! is_php('5.3'))
+ {
+ return $this->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();