summaryrefslogtreecommitdiffstats
path: root/tests/codeigniter/core
diff options
context:
space:
mode:
Diffstat (limited to 'tests/codeigniter/core')
-rw-r--r--tests/codeigniter/core/Log_test.php11
-rw-r--r--tests/codeigniter/core/Security_test.php6
2 files changed, 14 insertions, 3 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();
diff --git a/tests/codeigniter/core/Security_test.php b/tests/codeigniter/core/Security_test.php
index 2ef822863..8328c37cb 100644
--- a/tests/codeigniter/core/Security_test.php
+++ b/tests/codeigniter/core/Security_test.php
@@ -299,7 +299,8 @@ class Security_test extends CI_TestCase {
'<img src="mdn-logo-sm.png" alt="MD Logo" srcset="mdn-logo-HD.png 2x, mdn-logo-small.png 15w, mdn-banner-HD.png 100w 2x" />',
'<img sqrc="/img/sunset.gif" height="100%" width="100%">',
'<img srqc="/img/sunset.gif" height="100%" width="100%">',
- '<img srcq="/img/sunset.gif" height="100%" width="100%">'
+ '<img srcq="/img/sunset.gif" height="100%" width="100%">',
+ '<img src=non-quoted.attribute foo="bar">'
);
$urls = array(
@@ -310,7 +311,8 @@ class Security_test extends CI_TestCase {
'mdn-logo-sm.png',
'<img sqrc="/img/sunset.gif" height="100%" width="100%">',
'<img srqc="/img/sunset.gif" height="100%" width="100%">',
- '<img srcq="/img/sunset.gif" height="100%" width="100%">'
+ '<img srcq="/img/sunset.gif" height="100%" width="100%">',
+ 'non-quoted.attribute'
);
for ($i = 0; $i < count($imgtags); $i++)