From ba8f8bca6946c85f78c3d65802474bb128bbf8d9 Mon Sep 17 00:00:00 2001 From: Master Yoda Date: Sun, 20 Sep 2015 09:15:05 -0700 Subject: The Lang unit testing claimed to be testing for non-alpha idioms, but wasn't. Setup a new test method to isolate this. Signed-off-by:Master Yoda --- tests/codeigniter/core/Lang_test.php | 173 ++++++++++++++++++----------------- 1 file changed, 89 insertions(+), 84 deletions(-) (limited to 'tests/codeigniter/core/Lang_test.php') diff --git a/tests/codeigniter/core/Lang_test.php b/tests/codeigniter/core/Lang_test.php index d2dd7598a..f04f6eab9 100644 --- a/tests/codeigniter/core/Lang_test.php +++ b/tests/codeigniter/core/Lang_test.php @@ -2,88 +2,93 @@ class Lang_test extends CI_TestCase { - protected $lang; - - public function set_up() - { - $loader_cls = $this->ci_core_class('load'); - $this->ci_instance_var('load', new $loader_cls); - $cls = $this->ci_core_class('lang'); - $this->lang = new $cls; - } - - // -------------------------------------------------------------------- - - public function test_load() - { - // Regular usage - $this->ci_vfs_clone('system/language/english/profiler_lang.php'); - $this->assertTrue($this->lang->load('profiler', 'english')); - $this->assertEquals('URI STRING', $this->lang->language['profiler_uri_string']); - - // Already loaded file - $this->assertNull($this->lang->load('profiler', 'english')); - - // Unspecified language (defaults to english) - $this->ci_vfs_clone('system/language/english/date_lang.php'); - $this->assertTrue($this->lang->load('date')); - $this->assertEquals('Year', $this->lang->language['date_year']); - - // A language other than english - $this->ci_vfs_clone('system/language/english/email_lang.php', 'system/language/german/'); - $this->assertTrue($this->lang->load('email', 'german')); - $this->assertEquals('german', $this->lang->is_loaded['email_lang.php']); - - // Non-alpha idiom (should act the same as unspecified language) - $this->ci_vfs_clone('system/language/english/number_lang.php'); - $this->assertTrue($this->lang->load('number')); - $this->assertEquals('Bytes', $this->lang->language['bytes']); - - // Non-existent file - $this->setExpectedException( - 'RuntimeException', - 'CI Error: Unable to load the requested language file: language/english/nonexistent_lang.php' - ); - $this->lang->load('nonexistent'); - } - - // -------------------------------------------------------------------- - - public function test_multiple_file_load() - { - // Multiple files - $this->ci_vfs_clone('system/language/english/profiler_lang.php'); - $files = array( - 0 => 'profiler', - 1 => 'nonexistent' - ); - $this->setExpectedException( - 'RuntimeException', - 'CI Error: Unable to load the requested language file: language/english/nonexistent_lang.php' - ); - $this->lang->load($files, 'english'); - } - - // -------------------------------------------------------------------- - - public function test_alternative_path_load() - { - // Alternative Path - $this->ci_vfs_clone('system/language/english/profiler_lang.php'); - $this->assertTrue($this->lang->load('profiler', 'english', FALSE, TRUE, 'vfs://system/')); - } - - // -------------------------------------------------------------------- - - /** - * @depends test_load - */ - public function test_line() - { - $this->ci_vfs_clone('system/language/english/profiler_lang.php'); - $this->lang->load('profiler', 'english'); - $this->assertEquals('URI STRING', $this->lang->line('profiler_uri_string')); - $this->assertFalse($this->lang->line('nonexistent_string')); - $this->assertFalse($this->lang->line(NULL)); - } + protected $lang; + + public function set_up() { + $loader_cls = $this->ci_core_class('load'); + $this->ci_instance_var('load', new $loader_cls); + $cls = $this->ci_core_class('lang'); + $this->lang = new $cls; + } + + // -------------------------------------------------------------------- + + public function test_load() { + // Regular usage + $this->ci_vfs_clone('system/language/english/profiler_lang.php'); + $this->assertTrue($this->lang->load('profiler', 'english')); + $this->assertEquals('URI STRING', $this->lang->language['profiler_uri_string']); + + // Already loaded file + $this->assertNull($this->lang->load('profiler', 'english')); + + // Unspecified language (defaults to english) + $this->ci_vfs_clone('system/language/english/date_lang.php'); + $this->assertTrue($this->lang->load('date')); + $this->assertEquals('Year', $this->lang->language['date_year']); + + // A language other than english + $this->ci_vfs_clone('system/language/english/email_lang.php', 'application/language/german/'); + $this->assertTrue($this->lang->load('email', 'german')); + $this->assertEquals('german', $this->lang->is_loaded['email_lang.php']); + + // Non-existent file + $this->setExpectedException( + 'RuntimeException', 'CI Error: Unable to load the requested language file: language/english/nonexistent_lang.php' + ); + $this->lang->load('nonexistent'); + } + + // -------------------------------------------------------------------- + + public function test_non_alpha_idiom() { + // Non-alpha idiom (should act the same as unspecified language) + // test with existing file + $this->ci_vfs_clone('system/language/english/number_lang.php'); + $this->ci_vfs_clone('system/language/english/number_lang.php', 'system/language/123funny/'); + $this->assertTrue($this->lang->load('number', '123funny')); + $this->assertEquals('Bytes', $this->lang->language['bytes']); + + // test without existing file + $this->ci_vfs_clone('system/language/english/email_lang.php'); + $this->assertTrue($this->lang->load('email', '456funny')); + $this->assertEquals('Bytes', $this->lang->language['bytes']); + } + + // -------------------------------------------------------------------- + + public function test_multiple_file_load() { + // Multiple files + $this->ci_vfs_clone('system/language/english/profiler_lang.php'); + $files = array( + 0 => 'profiler', + 1 => 'nonexistent' + ); + $this->setExpectedException( + 'RuntimeException', 'CI Error: Unable to load the requested language file: language/english/nonexistent_lang.php' + ); + $this->lang->load($files, 'english'); + } + + // -------------------------------------------------------------------- + + public function test_alternative_path_load() { + // Alternative Path + $this->ci_vfs_clone('system/language/english/profiler_lang.php'); + $this->assertTrue($this->lang->load('profiler', 'english', FALSE, TRUE, 'vfs://system/')); + } + + // -------------------------------------------------------------------- + + /** + * @depends test_load + */ + public function test_line() { + $this->ci_vfs_clone('system/language/english/profiler_lang.php'); + $this->lang->load('profiler', 'english'); + $this->assertEquals('URI STRING', $this->lang->line('profiler_uri_string')); + $this->assertFalse($this->lang->line('nonexistent_string')); + $this->assertFalse($this->lang->line(NULL)); + } + } -- cgit v1.2.3-24-g4f1b From 1adf834231dae85e55c1bf2d19f3f4b28324f356 Mon Sep 17 00:00:00 2001 From: Master Yoda Date: Sun, 20 Sep 2015 09:39:39 -0700 Subject: The Lang unit testing claimed to be testing for non-alpha idioms, but wasn't. Setup a new test method to isolate this. Signed-off-by:Master Yoda --- tests/codeigniter/core/Lang_test.php | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'tests/codeigniter/core/Lang_test.php') diff --git a/tests/codeigniter/core/Lang_test.php b/tests/codeigniter/core/Lang_test.php index f04f6eab9..8262d3e75 100644 --- a/tests/codeigniter/core/Lang_test.php +++ b/tests/codeigniter/core/Lang_test.php @@ -4,7 +4,8 @@ class Lang_test extends CI_TestCase { protected $lang; - public function set_up() { + public function set_up() + { $loader_cls = $this->ci_core_class('load'); $this->ci_instance_var('load', new $loader_cls); $cls = $this->ci_core_class('lang'); @@ -13,7 +14,8 @@ class Lang_test extends CI_TestCase { // -------------------------------------------------------------------- - public function test_load() { + public function test_load() + { // Regular usage $this->ci_vfs_clone('system/language/english/profiler_lang.php'); $this->assertTrue($this->lang->load('profiler', 'english')); @@ -41,7 +43,8 @@ class Lang_test extends CI_TestCase { // -------------------------------------------------------------------- - public function test_non_alpha_idiom() { + public function test_non_alpha_idiom() + { // Non-alpha idiom (should act the same as unspecified language) // test with existing file $this->ci_vfs_clone('system/language/english/number_lang.php'); @@ -57,7 +60,8 @@ class Lang_test extends CI_TestCase { // -------------------------------------------------------------------- - public function test_multiple_file_load() { + public function test_multiple_file_load() + { // Multiple files $this->ci_vfs_clone('system/language/english/profiler_lang.php'); $files = array( @@ -72,7 +76,8 @@ class Lang_test extends CI_TestCase { // -------------------------------------------------------------------- - public function test_alternative_path_load() { + public function test_alternative_path_load() + { // Alternative Path $this->ci_vfs_clone('system/language/english/profiler_lang.php'); $this->assertTrue($this->lang->load('profiler', 'english', FALSE, TRUE, 'vfs://system/')); @@ -83,7 +88,8 @@ class Lang_test extends CI_TestCase { /** * @depends test_load */ - public function test_line() { + public function test_line() + { $this->ci_vfs_clone('system/language/english/profiler_lang.php'); $this->lang->load('profiler', 'english'); $this->assertEquals('URI STRING', $this->lang->line('profiler_uri_string')); -- cgit v1.2.3-24-g4f1b From 5f8fa02b9e386dfc474d8a6f2302e32674f2b55a Mon Sep 17 00:00:00 2001 From: Master Yoda Date: Sun, 20 Sep 2015 09:43:12 -0700 Subject: Revert "The Lang unit testing claimed to be testing for non-alpha idioms, but wasn't. Setup a new test method to isolate this. Signed-off-by:Master Yoda " This reverts commit 1adf834231dae85e55c1bf2d19f3f4b28324f356. --- tests/codeigniter/core/Lang_test.php | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'tests/codeigniter/core/Lang_test.php') diff --git a/tests/codeigniter/core/Lang_test.php b/tests/codeigniter/core/Lang_test.php index 8262d3e75..f04f6eab9 100644 --- a/tests/codeigniter/core/Lang_test.php +++ b/tests/codeigniter/core/Lang_test.php @@ -4,8 +4,7 @@ class Lang_test extends CI_TestCase { protected $lang; - public function set_up() - { + public function set_up() { $loader_cls = $this->ci_core_class('load'); $this->ci_instance_var('load', new $loader_cls); $cls = $this->ci_core_class('lang'); @@ -14,8 +13,7 @@ class Lang_test extends CI_TestCase { // -------------------------------------------------------------------- - public function test_load() - { + public function test_load() { // Regular usage $this->ci_vfs_clone('system/language/english/profiler_lang.php'); $this->assertTrue($this->lang->load('profiler', 'english')); @@ -43,8 +41,7 @@ class Lang_test extends CI_TestCase { // -------------------------------------------------------------------- - public function test_non_alpha_idiom() - { + public function test_non_alpha_idiom() { // Non-alpha idiom (should act the same as unspecified language) // test with existing file $this->ci_vfs_clone('system/language/english/number_lang.php'); @@ -60,8 +57,7 @@ class Lang_test extends CI_TestCase { // -------------------------------------------------------------------- - public function test_multiple_file_load() - { + public function test_multiple_file_load() { // Multiple files $this->ci_vfs_clone('system/language/english/profiler_lang.php'); $files = array( @@ -76,8 +72,7 @@ class Lang_test extends CI_TestCase { // -------------------------------------------------------------------- - public function test_alternative_path_load() - { + public function test_alternative_path_load() { // Alternative Path $this->ci_vfs_clone('system/language/english/profiler_lang.php'); $this->assertTrue($this->lang->load('profiler', 'english', FALSE, TRUE, 'vfs://system/')); @@ -88,8 +83,7 @@ class Lang_test extends CI_TestCase { /** * @depends test_load */ - public function test_line() - { + public function test_line() { $this->ci_vfs_clone('system/language/english/profiler_lang.php'); $this->lang->load('profiler', 'english'); $this->assertEquals('URI STRING', $this->lang->line('profiler_uri_string')); -- cgit v1.2.3-24-g4f1b From 8a9932ba827f5d69e6aaf5f16cb5c3b1c8024904 Mon Sep 17 00:00:00 2001 From: Master Yoda Date: Sun, 20 Sep 2015 09:43:32 -0700 Subject: Revert "Revert "The Lang unit testing claimed to be testing for non-alpha idioms, but wasn't. Setup a new test method to isolate this. Signed-off-by:Master Yoda "" This reverts commit 5f8fa02b9e386dfc474d8a6f2302e32674f2b55a. --- tests/codeigniter/core/Lang_test.php | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'tests/codeigniter/core/Lang_test.php') diff --git a/tests/codeigniter/core/Lang_test.php b/tests/codeigniter/core/Lang_test.php index f04f6eab9..8262d3e75 100644 --- a/tests/codeigniter/core/Lang_test.php +++ b/tests/codeigniter/core/Lang_test.php @@ -4,7 +4,8 @@ class Lang_test extends CI_TestCase { protected $lang; - public function set_up() { + public function set_up() + { $loader_cls = $this->ci_core_class('load'); $this->ci_instance_var('load', new $loader_cls); $cls = $this->ci_core_class('lang'); @@ -13,7 +14,8 @@ class Lang_test extends CI_TestCase { // -------------------------------------------------------------------- - public function test_load() { + public function test_load() + { // Regular usage $this->ci_vfs_clone('system/language/english/profiler_lang.php'); $this->assertTrue($this->lang->load('profiler', 'english')); @@ -41,7 +43,8 @@ class Lang_test extends CI_TestCase { // -------------------------------------------------------------------- - public function test_non_alpha_idiom() { + public function test_non_alpha_idiom() + { // Non-alpha idiom (should act the same as unspecified language) // test with existing file $this->ci_vfs_clone('system/language/english/number_lang.php'); @@ -57,7 +60,8 @@ class Lang_test extends CI_TestCase { // -------------------------------------------------------------------- - public function test_multiple_file_load() { + public function test_multiple_file_load() + { // Multiple files $this->ci_vfs_clone('system/language/english/profiler_lang.php'); $files = array( @@ -72,7 +76,8 @@ class Lang_test extends CI_TestCase { // -------------------------------------------------------------------- - public function test_alternative_path_load() { + public function test_alternative_path_load() + { // Alternative Path $this->ci_vfs_clone('system/language/english/profiler_lang.php'); $this->assertTrue($this->lang->load('profiler', 'english', FALSE, TRUE, 'vfs://system/')); @@ -83,7 +88,8 @@ class Lang_test extends CI_TestCase { /** * @depends test_load */ - public function test_line() { + public function test_line() + { $this->ci_vfs_clone('system/language/english/profiler_lang.php'); $this->lang->load('profiler', 'english'); $this->assertEquals('URI STRING', $this->lang->line('profiler_uri_string')); -- cgit v1.2.3-24-g4f1b From b6b401bcb134f7e99a9ea18e300c0af44d0685bf Mon Sep 17 00:00:00 2001 From: Master Yoda Date: Sun, 20 Sep 2015 09:46:40 -0700 Subject: The Lang unit testing claimed to be testing for non-alpha idioms, but wasn't. Setup a new test method to isolate this. Signed-off-by:Master Yoda --- tests/codeigniter/core/Lang_test.php | 193 ++++++++++++++++++----------------- 1 file changed, 99 insertions(+), 94 deletions(-) (limited to 'tests/codeigniter/core/Lang_test.php') diff --git a/tests/codeigniter/core/Lang_test.php b/tests/codeigniter/core/Lang_test.php index 8262d3e75..f8c12d884 100644 --- a/tests/codeigniter/core/Lang_test.php +++ b/tests/codeigniter/core/Lang_test.php @@ -2,99 +2,104 @@ class Lang_test extends CI_TestCase { - protected $lang; - - public function set_up() - { - $loader_cls = $this->ci_core_class('load'); - $this->ci_instance_var('load', new $loader_cls); - $cls = $this->ci_core_class('lang'); - $this->lang = new $cls; - } - - // -------------------------------------------------------------------- - - public function test_load() - { - // Regular usage - $this->ci_vfs_clone('system/language/english/profiler_lang.php'); - $this->assertTrue($this->lang->load('profiler', 'english')); - $this->assertEquals('URI STRING', $this->lang->language['profiler_uri_string']); - - // Already loaded file - $this->assertNull($this->lang->load('profiler', 'english')); - - // Unspecified language (defaults to english) - $this->ci_vfs_clone('system/language/english/date_lang.php'); - $this->assertTrue($this->lang->load('date')); - $this->assertEquals('Year', $this->lang->language['date_year']); - - // A language other than english - $this->ci_vfs_clone('system/language/english/email_lang.php', 'application/language/german/'); - $this->assertTrue($this->lang->load('email', 'german')); - $this->assertEquals('german', $this->lang->is_loaded['email_lang.php']); - - // Non-existent file - $this->setExpectedException( - 'RuntimeException', 'CI Error: Unable to load the requested language file: language/english/nonexistent_lang.php' - ); - $this->lang->load('nonexistent'); - } - - // -------------------------------------------------------------------- - - public function test_non_alpha_idiom() - { - // Non-alpha idiom (should act the same as unspecified language) - // test with existing file - $this->ci_vfs_clone('system/language/english/number_lang.php'); - $this->ci_vfs_clone('system/language/english/number_lang.php', 'system/language/123funny/'); - $this->assertTrue($this->lang->load('number', '123funny')); - $this->assertEquals('Bytes', $this->lang->language['bytes']); - - // test without existing file - $this->ci_vfs_clone('system/language/english/email_lang.php'); - $this->assertTrue($this->lang->load('email', '456funny')); - $this->assertEquals('Bytes', $this->lang->language['bytes']); - } - - // -------------------------------------------------------------------- - - public function test_multiple_file_load() - { - // Multiple files - $this->ci_vfs_clone('system/language/english/profiler_lang.php'); - $files = array( - 0 => 'profiler', - 1 => 'nonexistent' - ); - $this->setExpectedException( - 'RuntimeException', 'CI Error: Unable to load the requested language file: language/english/nonexistent_lang.php' - ); - $this->lang->load($files, 'english'); - } - - // -------------------------------------------------------------------- - - public function test_alternative_path_load() - { - // Alternative Path - $this->ci_vfs_clone('system/language/english/profiler_lang.php'); - $this->assertTrue($this->lang->load('profiler', 'english', FALSE, TRUE, 'vfs://system/')); - } - - // -------------------------------------------------------------------- - - /** - * @depends test_load - */ - public function test_line() - { - $this->ci_vfs_clone('system/language/english/profiler_lang.php'); - $this->lang->load('profiler', 'english'); - $this->assertEquals('URI STRING', $this->lang->line('profiler_uri_string')); - $this->assertFalse($this->lang->line('nonexistent_string')); - $this->assertFalse($this->lang->line(NULL)); - } + protected $lang; + + public function set_up() + { + $loader_cls = $this->ci_core_class('load'); + $this->ci_instance_var('load', new $loader_cls); + $cls = $this->ci_core_class('lang'); + $this->lang = new $cls; + } + + // -------------------------------------------------------------------- + + public function test_load() + { + // Regular usage + $this->ci_vfs_clone('system/language/english/profiler_lang.php'); + $this->assertTrue($this->lang->load('profiler', 'english')); + $this->assertEquals('URI STRING', $this->lang->language['profiler_uri_string']); + + // Already loaded file + $this->assertNull($this->lang->load('profiler', 'english')); + + // Unspecified language (defaults to english) + $this->ci_vfs_clone('system/language/english/date_lang.php'); + $this->assertTrue($this->lang->load('date')); + $this->assertEquals('Year', $this->lang->language['date_year']); + + // A language other than english + $this->ci_vfs_clone('system/language/english/email_lang.php', 'system/language/german/'); + $this->assertTrue($this->lang->load('email', 'german')); + $this->assertEquals('german', $this->lang->is_loaded['email_lang.php']); + + // Non-alpha idiom (should act the same as unspecified language) + $this->ci_vfs_clone('system/language/english/number_lang.php'); + $this->assertTrue($this->lang->load('number')); + $this->assertEquals('Bytes', $this->lang->language['bytes']); + + // Non-existent file + $this->setExpectedException( + 'RuntimeException', 'CI Error: Unable to load the requested language file: language/english/nonexistent_lang.php' + ); + $this->lang->load('nonexistent'); + } + + // -------------------------------------------------------------------- + + public function test_non_alpha_idiom() + { + // Non-alpha idiom (should act the same as unspecified language) + // test with existing file + $this->ci_vfs_clone('system/language/english/number_lang.php'); + $this->ci_vfs_clone('system/language/english/number_lang.php', 'system/language/123funny/'); + $this->assertTrue($this->lang->load('number', '123funny')); + $this->assertEquals('Bytes', $this->lang->language['bytes']); + + // test without existing file + $this->ci_vfs_clone('system/language/english/email_lang.php'); + $this->assertTrue($this->lang->load('email', '456funny')); + $this->assertEquals('Bytes', $this->lang->language['bytes']); + } + + // -------------------------------------------------------------------- + + public function test_multiple_file_load() + { + // Multiple files + $this->ci_vfs_clone('system/language/english/profiler_lang.php'); + $files = array( + 0 => 'profiler', + 1 => 'nonexistent' + ); + $this->setExpectedException( + 'RuntimeException', 'CI Error: Unable to load the requested language file: language/english/nonexistent_lang.php' + ); + $this->lang->load($files, 'english'); + } + + // -------------------------------------------------------------------- + + public function test_alternative_path_load() + { + // Alternative Path + $this->ci_vfs_clone('system/language/english/profiler_lang.php'); + $this->assertTrue($this->lang->load('profiler', 'english', FALSE, TRUE, 'vfs://system/')); + } + + // -------------------------------------------------------------------- + + /** + * @depends test_load + */ + public function test_line() + { + $this->ci_vfs_clone('system/language/english/profiler_lang.php'); + $this->lang->load('profiler', 'english'); + $this->assertEquals('URI STRING', $this->lang->line('profiler_uri_string')); + $this->assertFalse($this->lang->line('nonexistent_string')); + $this->assertFalse($this->lang->line(NULL)); + } } -- cgit v1.2.3-24-g4f1b From 9f1b1bc3dd18ec8439b3fda6ac92c2cd87da31fb Mon Sep 17 00:00:00 2001 From: Master Yoda Date: Mon, 21 Sep 2015 07:22:25 -0700 Subject: Changes suggested by Andrey Signed-off-by:Master Yoda --- tests/codeigniter/core/Lang_test.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tests/codeigniter/core/Lang_test.php') diff --git a/tests/codeigniter/core/Lang_test.php b/tests/codeigniter/core/Lang_test.php index f8c12d884..1aa5212ac 100644 --- a/tests/codeigniter/core/Lang_test.php +++ b/tests/codeigniter/core/Lang_test.php @@ -41,7 +41,8 @@ class Lang_test extends CI_TestCase { // Non-existent file $this->setExpectedException( - 'RuntimeException', 'CI Error: Unable to load the requested language file: language/english/nonexistent_lang.php' + 'RuntimeException', + 'CI Error: Unable to load the requested language file: language/english/nonexistent_lang.php' ); $this->lang->load('nonexistent'); } @@ -74,7 +75,8 @@ class Lang_test extends CI_TestCase { 1 => 'nonexistent' ); $this->setExpectedException( - 'RuntimeException', 'CI Error: Unable to load the requested language file: language/english/nonexistent_lang.php' + 'RuntimeException', + 'CI Error: Unable to load the requested language file: language/english/nonexistent_lang.php' ); $this->lang->load($files, 'english'); } -- cgit v1.2.3-24-g4f1b From 4f674091a22fa07d034eebef5848620fca6f9ca2 Mon Sep 17 00:00:00 2001 From: Master Yoda Date: Thu, 24 Sep 2015 07:25:32 -0700 Subject: Fix the tabs Signed-off-by:Master Yoda --- tests/codeigniter/core/Lang_test.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/codeigniter/core/Lang_test.php') diff --git a/tests/codeigniter/core/Lang_test.php b/tests/codeigniter/core/Lang_test.php index 1aa5212ac..8197028a2 100644 --- a/tests/codeigniter/core/Lang_test.php +++ b/tests/codeigniter/core/Lang_test.php @@ -41,8 +41,8 @@ class Lang_test extends CI_TestCase { // Non-existent file $this->setExpectedException( - 'RuntimeException', - 'CI Error: Unable to load the requested language file: language/english/nonexistent_lang.php' + 'RuntimeException', + 'CI Error: Unable to load the requested language file: language/english/nonexistent_lang.php' ); $this->lang->load('nonexistent'); } @@ -75,8 +75,8 @@ class Lang_test extends CI_TestCase { 1 => 'nonexistent' ); $this->setExpectedException( - 'RuntimeException', - 'CI Error: Unable to load the requested language file: language/english/nonexistent_lang.php' + 'RuntimeException', + 'CI Error: Unable to load the requested language file: language/english/nonexistent_lang.php' ); $this->lang->load($files, 'english'); } -- cgit v1.2.3-24-g4f1b From fcb4129694951a8e43aacbdbaa08688d1c7c7225 Mon Sep 17 00:00:00 2001 From: Master Yoda Date: Thu, 24 Sep 2015 07:26:32 -0700 Subject: Fix the tabs Signed-off-by:Master Yoda --- tests/codeigniter/core/Lang_test.php | 1 - 1 file changed, 1 deletion(-) (limited to 'tests/codeigniter/core/Lang_test.php') diff --git a/tests/codeigniter/core/Lang_test.php b/tests/codeigniter/core/Lang_test.php index 8197028a2..c5aaf04b2 100644 --- a/tests/codeigniter/core/Lang_test.php +++ b/tests/codeigniter/core/Lang_test.php @@ -103,5 +103,4 @@ class Lang_test extends CI_TestCase { $this->assertFalse($this->lang->line('nonexistent_string')); $this->assertFalse($this->lang->line(NULL)); } - } -- cgit v1.2.3-24-g4f1b From deabce0f19610949a297093516527837ee094469 Mon Sep 17 00:00:00 2001 From: Master Yoda Date: Thu, 24 Sep 2015 07:27:33 -0700 Subject: Fix the tabs Signed-off-by:Master Yoda --- tests/codeigniter/core/Lang_test.php | 5 ----- 1 file changed, 5 deletions(-) (limited to 'tests/codeigniter/core/Lang_test.php') diff --git a/tests/codeigniter/core/Lang_test.php b/tests/codeigniter/core/Lang_test.php index c5aaf04b2..263bb9665 100644 --- a/tests/codeigniter/core/Lang_test.php +++ b/tests/codeigniter/core/Lang_test.php @@ -34,11 +34,6 @@ class Lang_test extends CI_TestCase { $this->assertTrue($this->lang->load('email', 'german')); $this->assertEquals('german', $this->lang->is_loaded['email_lang.php']); - // Non-alpha idiom (should act the same as unspecified language) - $this->ci_vfs_clone('system/language/english/number_lang.php'); - $this->assertTrue($this->lang->load('number')); - $this->assertEquals('Bytes', $this->lang->language['bytes']); - // Non-existent file $this->setExpectedException( 'RuntimeException', -- cgit v1.2.3-24-g4f1b From ddb80e7402697b6ca995f31810ad9e1c8f380b81 Mon Sep 17 00:00:00 2001 From: Master Yoda Date: Sat, 26 Sep 2015 10:05:45 -0700 Subject: Fix the testing of non-alhpa idioms Signed-off-by:Master Yoda --- tests/codeigniter/core/Lang_test.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/codeigniter/core/Lang_test.php') diff --git a/tests/codeigniter/core/Lang_test.php b/tests/codeigniter/core/Lang_test.php index 263bb9665..4958f42e1 100644 --- a/tests/codeigniter/core/Lang_test.php +++ b/tests/codeigniter/core/Lang_test.php @@ -56,7 +56,7 @@ class Lang_test extends CI_TestCase { // test without existing file $this->ci_vfs_clone('system/language/english/email_lang.php'); $this->assertTrue($this->lang->load('email', '456funny')); - $this->assertEquals('Bytes', $this->lang->language['bytes']); + $this->assertEquals('You did not specify a SMTP hostname.', $this->lang->language['email_no_hostname']); } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b