From 71e647782764184e3aab4faffe6d99176758979f Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 22 Mar 2018 16:48:55 +0200 Subject: [ci skip] 3.1.8 release --- tests/codeigniter/core/Common_test.php | 69 ---------------------------------- 1 file changed, 69 deletions(-) delete mode 100644 tests/codeigniter/core/Common_test.php (limited to 'tests/codeigniter/core/Common_test.php') diff --git a/tests/codeigniter/core/Common_test.php b/tests/codeigniter/core/Common_test.php deleted file mode 100644 index effae50c5..000000000 --- a/tests/codeigniter/core/Common_test.php +++ /dev/null @@ -1,69 +0,0 @@ -assertTrue(is_php('1.2.0')); - $this->assertFalse(is_php('9999.9.9')); - } - - // ------------------------------------------------------------------------ - - public function test_stringify_attributes() - { - $this->assertEquals(' class="foo" id="bar"', _stringify_attributes(array('class' => 'foo', 'id' => 'bar'))); - - $atts = new stdClass; - $atts->class = 'foo'; - $atts->id = 'bar'; - $this->assertEquals(' class="foo" id="bar"', _stringify_attributes($atts)); - - $atts = new stdClass; - $this->assertEquals('', _stringify_attributes($atts)); - - $this->assertEquals(' class="foo" id="bar"', _stringify_attributes('class="foo" id="bar"')); - - $this->assertEquals('', _stringify_attributes(array())); - } - - // ------------------------------------------------------------------------ - - public function test_stringify_js_attributes() - { - $this->assertEquals('width=800,height=600', _stringify_attributes(array('width' => '800', 'height' => '600'), TRUE)); - - $atts = new stdClass; - $atts->width = 800; - $atts->height = 600; - $this->assertEquals('width=800,height=600', _stringify_attributes($atts, TRUE)); - } - - // ------------------------------------------------------------------------ - - public function test_html_escape() - { - $this->assertEquals( - html_escape('Here is a string containing "quoted" text.'), - 'Here is a string containing "quoted" text.' - ); - - $this->assertEquals( - html_escape(array('associative' => 'and', array('multi' => 'dimentional'))), - array('associative' => 'and', array('multi' => 'dimentional')) - ); - } - - // ------------------------------------------------------------------------ - - public function test_remove_invisible_characters() - { - $raw_string = 'Here is a string containing invisible'.chr(0x08).' text %0e.'; - $removed_string = 'Here is a string containing invisible text %0e.'; - $this->assertEquals($removed_string, remove_invisible_characters($raw_string, FALSE)); - - $raw_string = 'Here is a string %0econtaining url_encoded invisible%1F text.'; - $removed_string = 'Here is a string containing url_encoded invisible text.'; - $this->assertEquals($removed_string, remove_invisible_characters($raw_string)); - } -} -- cgit v1.2.3-24-g4f1b