From 69c97a71476e4eaa6c629022fcd4ec7f36d4ec0d Mon Sep 17 00:00:00 2001 From: Pascal Kriete Date: Wed, 20 Apr 2011 21:44:54 -0400 Subject: Adding early bootstrap ideas for core test suite --- tests/codeigniter/core/Lang_test.php | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 tests/codeigniter/core/Lang_test.php (limited to 'tests/codeigniter/core/Lang_test.php') diff --git a/tests/codeigniter/core/Lang_test.php b/tests/codeigniter/core/Lang_test.php new file mode 100644 index 000000000..82e279a52 --- /dev/null +++ b/tests/codeigniter/core/Lang_test.php @@ -0,0 +1,31 @@ +ci_core_class('lang'); + $this->lang = new $cls; + } + + // -------------------------------------------------------------------- + + public function testLoad() + { + // get_config needs work + $this->markTestIncomplete('get_config needs work'); + //$this->assertTrue($this->lang->load('profiler')); + } + + // -------------------------------------------------------------------- + + public function testLine() + { + $this->markTestIncomplete('get_config needs work'); + + $this->assertEquals('URI STRING', $this->lang->line('profiler_uri_string')); + } + +} \ No newline at end of file -- cgit v1.2.3-24-g4f1b From 10ba64f9b76a25a77182d72a0a09413ccba12770 Mon Sep 17 00:00:00 2001 From: Pascal Kriete Date: Thu, 21 Apr 2011 01:00:27 -0400 Subject: Renamed the main test class, fixing test cases. --- 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 82e279a52..f65b335b0 100644 --- a/tests/codeigniter/core/Lang_test.php +++ b/tests/codeigniter/core/Lang_test.php @@ -1,6 +1,6 @@ Date: Thu, 21 Apr 2011 22:00:33 -0400 Subject: Reworked unit tests to match rest of framework and added a few more. --- tests/codeigniter/core/Lang_test.php | 6 +++--- 1 file changed, 3 insertions(+), 3 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 f65b335b0..dcc3d0879 100644 --- a/tests/codeigniter/core/Lang_test.php +++ b/tests/codeigniter/core/Lang_test.php @@ -4,7 +4,7 @@ class Lang_test extends CI_TestCase { protected $lang; - public function setUp() + public function set_up() { $cls = $this->ci_core_class('lang'); $this->lang = new $cls; @@ -12,7 +12,7 @@ class Lang_test extends CI_TestCase { // -------------------------------------------------------------------- - public function testLoad() + public function test_load() { // get_config needs work $this->markTestIncomplete('get_config needs work'); @@ -21,7 +21,7 @@ class Lang_test extends CI_TestCase { // -------------------------------------------------------------------- - public function testLine() + public function test_line() { $this->markTestIncomplete('get_config needs work'); -- cgit v1.2.3-24-g4f1b From 8749bc7e836c196dfef37d3b7b5a67736a15092c Mon Sep 17 00:00:00 2001 From: Taufan Aditya Date: Sun, 11 Mar 2012 05:43:45 +0700 Subject: Fix incomplete and skipped test --- tests/codeigniter/core/Lang_test.php | 10 +++++----- 1 file changed, 5 insertions(+), 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 dcc3d0879..a414f0ace 100644 --- a/tests/codeigniter/core/Lang_test.php +++ b/tests/codeigniter/core/Lang_test.php @@ -6,6 +6,9 @@ class Lang_test extends CI_TestCase { 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; } @@ -14,17 +17,14 @@ class Lang_test extends CI_TestCase { public function test_load() { - // get_config needs work - $this->markTestIncomplete('get_config needs work'); - //$this->assertTrue($this->lang->load('profiler')); + $this->assertTrue($this->lang->load('profiler', 'english')); } // -------------------------------------------------------------------- public function test_line() { - $this->markTestIncomplete('get_config needs work'); - + $this->assertTrue($this->lang->load('profiler', 'english')); $this->assertEquals('URI STRING', $this->lang->line('profiler_uri_string')); } -- cgit v1.2.3-24-g4f1b