summaryrefslogtreecommitdiffstats
path: root/tests/codeigniter/core/Security_test.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2015-03-18 11:35:47 +0100
committerAndrey Andreev <narf@devilix.net>2015-03-18 11:35:47 +0100
commitfe5099a695c25e503a0aff6124644b9011a27e0d (patch)
treed9fe18a4adaf8dd8e260462f58d37038c279b7b1 /tests/codeigniter/core/Security_test.php
parent35514731f05c749526939de4812f5288ff3cc007 (diff)
Polish some recent changes in test cases
Diffstat (limited to 'tests/codeigniter/core/Security_test.php')
-rw-r--r--tests/codeigniter/core/Security_test.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/codeigniter/core/Security_test.php b/tests/codeigniter/core/Security_test.php
index 7f467fb1b..b5524da0f 100644
--- a/tests/codeigniter/core/Security_test.php
+++ b/tests/codeigniter/core/Security_test.php
@@ -138,12 +138,12 @@ class Security_test extends CI_TestCase {
public function test_remove_evil_attributes()
{
- $this->assertEquals('<foo [removed]>', $this->security->remove_evil_attributes('<foo onAttribute="bar">', false));
- $this->assertEquals('<foo [removed]>', $this->security->remove_evil_attributes('<foo onAttributeNoQuotes=bar>', false));
- $this->assertEquals('<foo [removed]>', $this->security->remove_evil_attributes('<foo onAttributeWithSpaces = bar>', false));
- $this->assertEquals('<foo prefixOnAttribute="bar">', $this->security->remove_evil_attributes('<foo prefixOnAttribute="bar">', false));
- $this->assertEquals('<foo>onOutsideOfTag=test</foo>', $this->security->remove_evil_attributes('<foo>onOutsideOfTag=test</foo>', false));
- $this->assertEquals('onNoTagAtAll = true', $this->security->remove_evil_attributes('onNoTagAtAll = true', false));
+ $this->assertEquals('<foo [removed]>', $this->security->remove_evil_attributes('<foo onAttribute="bar">', FALSE));
+ $this->assertEquals('<foo [removed]>', $this->security->remove_evil_attributes('<foo onAttributeNoQuotes=bar>', FALSE));
+ $this->assertEquals('<foo [removed]>', $this->security->remove_evil_attributes('<foo onAttributeWithSpaces = bar>', FALSE));
+ $this->assertEquals('<foo prefixOnAttribute="bar">', $this->security->remove_evil_attributes('<foo prefixOnAttribute="bar">', FALSE));
+ $this->assertEquals('<foo>onOutsideOfTag=test</foo>', $this->security->remove_evil_attributes('<foo>onOutsideOfTag=test</foo>', FALSE));
+ $this->assertEquals('onNoTagAtAll = true', $this->security->remove_evil_attributes('onNoTagAtAll = true', FALSE));
}
// --------------------------------------------------------------------
@@ -199,7 +199,7 @@ class Security_test extends CI_TestCase {
public function test_strip_image_tags()
{
- $imgtags = Array(
+ $imgtags = array(
'<img src="smiley.gif" alt="Smiley face" height="42" width="42">',
'<img alt="Smiley face" height="42" width="42" src="smiley.gif">',
'<img src="http://www.w3schools.com/images/w3schools_green.jpg">',
@@ -210,7 +210,7 @@ class Security_test extends CI_TestCase {
'<img srcq="/img/sunset.gif" height="100%" width="100%">'
);
- $urls = Array(
+ $urls = array(
'smiley.gif',
'smiley.gif',
'http://www.w3schools.com/images/w3schools_green.jpg',
@@ -221,7 +221,7 @@ class Security_test extends CI_TestCase {
'<img srcq="/img/sunset.gif" height="100%" width="100%">'
);
- for($i = 0; $i < count($imgtags); $i++)
+ for ($i = 0; $i < count($imgtags); $i++)
{
$this->assertEquals($urls[$i], $this->security->strip_image_tags($imgtags[$i]));
}
@@ -245,4 +245,4 @@ class Security_test extends CI_TestCase {
$this->assertNotEmpty($this->security->get_csrf_hash());
}
-} \ No newline at end of file
+}