summaryrefslogtreecommitdiffstats
path: root/tests/codeigniter/core/Output_test.php
diff options
context:
space:
mode:
authorDaniel Hunsaker <danhunsaker@gmail.com>2013-02-22 21:49:33 +0100
committerDaniel Hunsaker <danhunsaker@gmail.com>2013-02-22 21:49:33 +0100
commit44a6d1da2be916fe0f23a3ea4d5fcb391d7f65dd (patch)
tree31549ebf6ea5ea98e4347eb640d1caa685316f3e /tests/codeigniter/core/Output_test.php
parent353f9834adf3f44c6c7a0f924089bb2b43360404 (diff)
parenteb291c1d1e1116a4420fa30e587adeea0451eeb7 (diff)
Merge branch 'develop' of github.com:EllisLab/CodeIgniter into feature/exit-status
Diffstat (limited to 'tests/codeigniter/core/Output_test.php')
-rw-r--r--tests/codeigniter/core/Output_test.php35
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/codeigniter/core/Output_test.php b/tests/codeigniter/core/Output_test.php
index 728df3bf6..0eeb93f7b 100644
--- a/tests/codeigniter/core/Output_test.php
+++ b/tests/codeigniter/core/Output_test.php
@@ -3,6 +3,16 @@
class Output_test extends CI_TestCase {
public $output;
+ protected $_output_data = <<<HTML
+<html>
+ <head>
+ <title>Basic HTML</title>
+ </head>
+ <body>
+ Test
+ </body>
+</html>
+HTML;
public function set_up()
{
@@ -13,6 +23,31 @@ class Output_test extends CI_TestCase {
// --------------------------------------------------------------------
+ public function test_set_get_append_output()
+ {
+ $append = "<!-- comment /-->\n";
+
+ $this->assertEquals(
+ $this->_output_data.$append,
+ $this->output
+ ->set_output($this->_output_data)
+ ->append_output("<!-- comment /-->\n")
+ ->get_output()
+ );
+ }
+
+ // --------------------------------------------------------------------
+
+ public function test_minify()
+ {
+ $this->assertEquals(
+ str_replace(array("\t", "\n"), '', $this->_output_data),
+ $this->output->minify($this->_output_data)
+ );
+ }
+
+ // --------------------------------------------------------------------
+
public function test_get_content_type()
{
$this->assertEquals('text/html', $this->output->get_content_type());