summaryrefslogtreecommitdiffstats
path: root/tests/codeigniter
diff options
context:
space:
mode:
Diffstat (limited to 'tests/codeigniter')
-rw-r--r--tests/codeigniter/core/Loader_test.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/codeigniter/core/Loader_test.php b/tests/codeigniter/core/Loader_test.php
index d84928eca..782751cd7 100644
--- a/tests/codeigniter/core/Loader_test.php
+++ b/tests/codeigniter/core/Loader_test.php
@@ -117,6 +117,23 @@ class Loader_test extends CI_TestCase {
// --------------------------------------------------------------------
+ public function testLoadView()
+ {
+ $this->ci_set_core_class('output', 'CI_Output');
+
+ $content = 'This is my test page. <?php echo $hello; ?>';
+ $view = vfsStream::newFile('unit_test_view.php')->withContent($content)
+ ->at($this->load->views_dir);
+
+ // Use the optional return parameter in this test, so the view is not
+ // run through the output class.
+ $this->assertEquals('This is my test page. World!',
+ $this->load->view('unit_test_view', array('hello' => "World!"), TRUE));
+
+ }
+
+ // --------------------------------------------------------------------
+
public function testNonExistentView()
{
$this->setExpectedException(