From dbf3460bc7c94bf49db7dff3525906cae53a81ac Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 12 Jan 2015 13:37:13 +0200 Subject: Fix quoted_printable_encode() test A false positive is triggered when imap_8bit() exists, as it seems to have slightly different output. --- tests/codeigniter/core/compat/standard_test.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tests/codeigniter/core') diff --git a/tests/codeigniter/core/compat/standard_test.php b/tests/codeigniter/core/compat/standard_test.php index a3a6d9552..4077a5c7c 100644 --- a/tests/codeigniter/core/compat/standard_test.php +++ b/tests/codeigniter/core/compat/standard_test.php @@ -449,7 +449,6 @@ class standard_test extends CI_TestCase { return $this->markTestSkipped('quoted_printable_encode() is already available on PHP 5.3'); } - // These are actually imap_8bit() tests: $this->assertEquals("String with CRLF at end=20\r\n", quoted_printable_encode("String with CRLF at end \r\n")); // ext/imap/tests/imap_8bit_basic.phpt says for this line: @@ -459,6 +458,11 @@ class standard_test extends CI_TestCase { $this->assertEquals("String with tab at end =09", quoted_printable_encode("String with tab at end \t")); $this->assertEquals("=00=01=02=03=04=FE=FF=0A=0D", quoted_printable_encode("\x00\x01\x02\x03\x04\xfe\xff\x0a\x0d")); + if (function_exists('imap_8bit')) + { + return $this->markTestIncomplete('imap_8bit() exists and is called as an alias for quoted_printable_encode()'); + } + // And these are from ext/standard/tests/strings/quoted_printable_encode_002.phpt: $this->assertEquals( "=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=\r\n" -- cgit v1.2.3-24-g4f1b From db669f1de59f7105e0b9cf39899b98fd75b90771 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 21 Jan 2015 16:51:51 +0200 Subject: Make libraries matching controller names loadable --- tests/codeigniter/core/Loader_test.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'tests/codeigniter/core') diff --git a/tests/codeigniter/core/Loader_test.php b/tests/codeigniter/core/Loader_test.php index 93ca5b223..9e2092e05 100644 --- a/tests/codeigniter/core/Loader_test.php +++ b/tests/codeigniter/core/Loader_test.php @@ -405,12 +405,19 @@ class Loader_test extends CI_TestCase { // Create model in VFS package path $dir = 'third-party'; $lib = 'unit_test_package'; - $class = 'CI_'.ucfirst($lib); + $class = ucfirst($lib); $this->ci_vfs_create(ucfirst($lib), 'ci_app_root, array($dir, 'libraries')); // Get paths $paths = $this->load->get_package_paths(TRUE); + // Test failed load without path + $this->setExpectedException( + 'RuntimeException', + 'CI Error: Unable to load the requested class: '.ucfirst($lib) + ); + $this->load->library($lib); + // Add path and verify $path = APPPATH.$dir.'/'; $this->assertInstanceOf('CI_Loader', $this->load->add_package_path($path)); @@ -432,13 +439,6 @@ class Loader_test extends CI_TestCase { // Remove path and verify restored paths $this->assertInstanceOf('CI_Loader', $this->load->remove_package_path($path)); $this->assertEquals($paths, $this->load->get_package_paths(TRUE)); - - // Test failed load without path - $this->setExpectedException( - 'RuntimeException', - 'CI Error: Unable to load the requested class: '.ucfirst($lib) - ); - $this->load->library($lib); } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b From 4cbe463b4c442e0e2dae2f43565e77f7ac5ecb86 Mon Sep 17 00:00:00 2001 From: vlakoff Date: Wed, 21 Jan 2015 22:56:22 +0100 Subject: Remove closing blocks at end of PHP files --- tests/codeigniter/core/URI_test.php | 3 --- 1 file changed, 3 deletions(-) (limited to 'tests/codeigniter/core') diff --git a/tests/codeigniter/core/URI_test.php b/tests/codeigniter/core/URI_test.php index 50663d54a..42dff3639 100644 --- a/tests/codeigniter/core/URI_test.php +++ b/tests/codeigniter/core/URI_test.php @@ -252,6 +252,3 @@ class URI_test extends CI_TestCase { } } - -/* End of file URI_test.php */ -/* Location: ./tests/core/URI_test.php */ \ No newline at end of file -- cgit v1.2.3-24-g4f1b