Cleanup: Set SVN properties
authorOliver Hader <oliver.hader@typo3.org>
Thu, 17 Sep 2009 15:23:36 +0000 (15:23 +0000)
committerOliver Hader <oliver.hader@typo3.org>
Thu, 17 Sep 2009 15:23:36 +0000 (15:23 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@5952 709f56b5-9817-0410-a4d7-c38de5d9e867

tests/t3lib/t3lib_pagerenderer_testcase.php

index 0691001..4a75c59 100644 (file)
-<?php\r
-/***************************************************************\r
-* Copyright notice\r
-*\r
-* (c) 2009 Steffen Kamper (info@sk-typo3.de)\r
-* All rights reserved\r
-*\r
-* This script is part of the TYPO3 project. The TYPO3 project is\r
-* free software; you can redistribute it and/or modify\r
-* it under the terms of the GNU General Public License as published by\r
-* the Free Software Foundation; either version 2 of the License or\r
-* (at your option) any later version.\r
-*\r
-* The GNU General Public License can be found at\r
-* http://www.gnu.org/copyleft/gpl.html.\r
-*\r
-* This script is distributed in the hope that it will be useful\r
-* but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
-* GNU General Public License for more details.\r
-*\r
-* This copyright notice MUST APPEAR in all copies of the script!\r
-***************************************************************/\r
-\r
-\r
-/**\r
- * Testcase for the t3lib_pageIncludes class in the TYPO3 core.\r
- *\r
- * @package TYPO3\r
- * @subpackage t3lib\r
- *\r
- * @author Steffen Kamper (info@sk-typo3.de)\r
- */\r
-class t3lib_PageRenderer_testcase extends tx_phpunit_testcase {\r
-       /**\r
-        * @var t3lib_pageIncludes\r
-        */\r
-       private $fixture;\r
-\r
-       const PART_COMPLETE = 0;\r
-       const PART_HEADER = 1;\r
-       const PART_FOOTER = 2;\r
-\r
-       public function setUp() {\r
-               $className = 't3lib_PageRenderer_' . uniqid('test');\r
-               eval('\r
-                       class ' . $className . ' extends t3lib_PageRenderer {\r
-                       }\r
-               ');\r
-               $this->fixture = new $className();\r
-       }\r
-\r
-       public function tearDown() {\r
-               unset(\r
-                       $this->fixture\r
-               );\r
-       }\r
-\r
-\r
-       //////////////////////////////////////\r
-       // Tests for the basic functionality\r
-       //////////////////////////////////////\r
-\r
-       /**\r
-        * @test\r
-        */\r
-       public function fixtureCanBeCreated() {\r
-               $this->assertTrue(\r
-                       $this->fixture instanceof t3lib_PageRenderer\r
-               );\r
-       }\r
-       \r
-       //////////////////////\r
-       // test functions\r
-       //////////////////////\r
-\r
-       /**\r
-       * test set xml prolog and doctype\r
-       * \r
-       */\r
-       public function testSetXmlPrologAndDocType() {\r
-               \r
-               $expectedReturnValue = '<?xml version="1.0" encoding="utf-8" ?>';\r
-               $this->fixture->setXmlPrologAndDocType('<?xml version="1.0" encoding="utf-8" ?>');\r
-               $out = $this->fixture->render();\r
-\r
-               $this->assertContains(\r
-                       $expectedReturnValue,\r
-                       $out\r
-               );\r
-       }\r
-\r
-       /**\r
-       * test set title\r
-       * \r
-       */\r
-       public function testSetTitle() {\r
-               \r
-               $expectedReturnValue = '<title>This is the title</title>';\r
-               $this->fixture->setTitle('This is the title');\r
-               $out = $this->fixture->render();\r
-\r
-               $this->assertContains(\r
-                       $expectedReturnValue,\r
-                       $out\r
-               );\r
-       }\r
-\r
-       /**\r
-       * test set charset\r
-       * \r
-       */\r
-       public function testSetCharset() {\r
-               \r
-               $expectedReturnValue = '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />';\r
-               $this->fixture->setCharset('utf-8');\r
-               $out = $this->fixture->render();\r
-\r
-               $this->assertContains(\r
-                       $expectedReturnValue,\r
-                       $out\r
-               );\r
-       }\r
-\r
-       /**\r
-       * test set favicon\r
-       * \r
-       */\r
-       public function testSetFavIcon() {\r
-               \r
-               $expectedReturnValue1 = '<link rel="shortcut icon" href="http://google.com/favicon.ico" />';\r
-               $expectedReturnValue2 = '<link rel="icon" href="http://google.com/favicon.ico" />';\r
-               $this->fixture->setFavIcon('http://google.com/favicon.ico');\r
-               $out = $this->fixture->render();\r
-\r
-               $this->assertContains(\r
-                       $expectedReturnValue1,\r
-                       $out\r
-               );\r
-               $this->assertContains(\r
-                       $expectedReturnValue2,\r
-                       $out\r
-               );\r
-               \r
-       }\r
-\r
-       /**\r
-       * test set baseUrl\r
-       * \r
-       */\r
-       public function testSetBaseUrl() {\r
-               \r
-               $expectedReturnValue = '<base href="http://ggogle.com/" />';\r
-               $this->fixture->setBaseUrl('http://ggogle.com/');\r
-               $out = $this->fixture->render();\r
-\r
-               $this->assertContains(\r
-                       $expectedReturnValue,\r
-                       $out\r
-               );\r
-       }\r
-\r
-       /**\r
-       * test add meta tag\r
-       * \r
-       */\r
-       public function testAddMetaTag() {\r
-               \r
-               $expectedReturnValue = '<meta name="author" content="Anna Lyse">';\r
-               $this->fixture->addMetaTag('<meta name="author" content="Anna Lyse">');\r
-               $out = $this->fixture->render();\r
-\r
-               $this->assertContains(\r
-                       $expectedReturnValue,\r
-                       $out\r
-               );\r
-       }\r
-\r
-       /**\r
-       * test add inline comment\r
-       * \r
-       */\r
-       public function testAddInlineComment() {\r
-               \r
-               $expectedReturnValue = 'this is an inline comment written by unit test';\r
-               $this->fixture->addInlineComment('this is an inline comment written by unit test');\r
-               $out = $this->fixture->render();\r
-\r
-               $this->assertContains(\r
-                       $expectedReturnValue,\r
-                       $out\r
-               );\r
-       }\r
-\r
-       /**\r
-       * test add header data\r
-       * \r
-       */\r
-       public function testAddHeaderData() {\r
-               \r
-               $expectedReturnValue = '<tag method="private" name="test" />';\r
-               $this->fixture->addHeaderData('<tag method="private" name="test" />');\r
-               $out = $this->fixture->render();\r
-\r
-               $this->assertContains(\r
-                       $expectedReturnValue,\r
-                       $out\r
-               );\r
-       }\r
-\r
-       /**\r
-       * test add footer data\r
-       * \r
-       */\r
-       public function testAddFooterData() {\r
-               \r
-               $expectedReturnValue = '<tag method="private" name="test" />';\r
-               $this->fixture->addFooterData('<tag method="private" name="test" />');\r
-               $out = $this->fixture->render(self::PART_FOOTER);\r
-\r
-               $this->assertContains(\r
-                       $expectedReturnValue,\r
-                       $out\r
-               );\r
-       }\r
-\r
-       /**\r
-       * test add JS library file\r
-       * \r
-       */\r
-       public function testAddJsLibrary() {\r
-               \r
-               $expectedReturnValue = '<script src="fileadmin/test.js" type="text/javascript"></script>';\r
-               $this->fixture->addJsLibrary('test', 'fileadmin/test.js');\r
-               $out = $this->fixture->render();\r
-\r
-               $this->assertContains(\r
-                       $expectedReturnValue,\r
-                       $out\r
-               );\r
-       }\r
-       \r
-       \r
-       /**\r
-       * test add JS footer library file\r
-       * \r
-       */\r
-       public function testAddJsFooterLibrary() {\r
-               \r
-               $expectedReturnValue = '<script src="fileadmin/test.js" type="text/javascript"></script>';\r
-               $this->fixture->addJsFooterLibrary('test', 'fileadmin/test.js');\r
-               $out = $this->fixture->render(self::PART_FOOTER);\r
-\r
-               $this->assertContains(\r
-                       $expectedReturnValue,\r
-                       $out\r
-               );\r
-       }\r
-\r
-       /**\r
-       * test add JS file\r
-       * \r
-       */\r
-       public function testAddJsFile() {\r
-               \r
-               $expectedReturnValue = '<script src="fileadmin/test.js" type="text/javascript"></script>';\r
-               $this->fixture->addJsFile('fileadmin/test.js');\r
-               $out = $this->fixture->render();\r
-\r
-               $this->assertContains(\r
-                       $expectedReturnValue,\r
-                       $out\r
-               );\r
-       }\r
-\r
-       /**\r
-       * test add JS file for footer\r
-       * \r
-       */\r
-       public function testAddJsFooterFile() {\r
-               \r
-               $expectedReturnValue = '<script src="fileadmin/test.js" type="text/javascript"></script>';\r
-               $this->fixture->addJsFooterFile('fileadmin/test.js');\r
-               $out = $this->fixture->render(self::PART_FOOTER);\r
-\r
-               $this->assertContains(\r
-                       $expectedReturnValue,\r
-                       $out\r
-               );\r
-       }\r
-\r
-       /**\r
-       * test add JS inline\r
-       * \r
-       */\r
-       public function testAddJsInlineCode() {\r
-               \r
-               $expectedReturnValue = 'var x = "testvar"';\r
-               $this->fixture->addJsInlineCode('test', 'var x = "testvar"');\r
-               $out = $this->fixture->render();\r
-\r
-               $this->assertContains(\r
-                       $expectedReturnValue,\r
-                       $out\r
-               );\r
-       }\r
-\r
-       /**\r
-       * test add JS inline for footer\r
-       * \r
-       */\r
-       public function testAddJsFooterInlineCode() {\r
-               \r
-               $expectedReturnValue = 'var x = "testvar"';\r
-               $this->fixture->addJsFooterInlineCode('test', 'var x = "testvar"');\r
-               $out = $this->fixture->render(self::PART_FOOTER);\r
-\r
-               $this->assertContains(\r
-                       $expectedReturnValue,\r
-                       $out\r
-               );\r
-       }\r
-\r
-       /**\r
-       * test add JS handler\r
-       * \r
-       */\r
-       public function testAddExtOnReadyCode() {\r
-               \r
-               $expectedReturnValue1 = 'Ext.onReady(function() {';\r
-               $expectedReturnValue2 = 'var x = "testvar";';\r
-               $this->fixture->loadExtJS();\r
-               $this->fixture->addExtOnReadyCode('var x = "testvar";');\r
-               $out = $this->fixture->render();\r
-\r
-               $this->assertContains(\r
-                       $expectedReturnValue1,\r
-                       $out\r
-               );\r
-               \r
-               $this->assertContains(\r
-                       $expectedReturnValue2,\r
-                       $out\r
-               );\r
-               \r
-       }\r
-\r
-       /**\r
-       * test add CSS file\r
-       * \r
-       */\r
-       public function testAddCssFile() {\r
-               \r
-               $expectedReturnValue = '<link rel="stylesheet" type="text/css" href="fileadmin/test.css" media="screen" />';\r
-               $this->fixture->addCssFile('fileadmin/test.css');\r
-               $out = $this->fixture->render();\r
-\r
-               $this->assertContains(\r
-                       $expectedReturnValue,\r
-                       $out\r
-               );\r
-       }\r
-\r
-       /**\r
-       * test add CSS inline\r
-       * \r
-       */\r
-       public function testAddCssInlineBlock() {\r
-               \r
-               $expectedReturnValue = 'body {margin:20px;}';\r
-               $this->fixture->addCssInlineBlock('general', 'body {margin:20px;}');\r
-               $out = $this->fixture->render();\r
-\r
-               $this->assertContains(\r
-                       $expectedReturnValue,\r
-                       $out\r
-               );\r
-       }\r
-\r
-       /**\r
-       * test add CSS inline and force on top\r
-       * \r
-       */\r
-       public function testAddCssInlineBlockForceOnTop() {\r
-               \r
-               $expectedReturnValue = '/*general1*/' . chr(10) . 'h1 {margin:20px;}' . chr(10) . '/*general*/' . chr(10) . 'body {margin:20px;}';\r
-               $this->fixture->addCssInlineBlock('general', 'body {margin:20px;}');\r
-               $this->fixture->addCssInlineBlock('general1', 'h1 {margin:20px;}', NULL, TRUE);\r
-               $out = $this->fixture->render();\r
-\r
-               $this->assertContains(\r
-                       $expectedReturnValue,\r
-                       $out\r
-               );\r
-       }\r
-\r
-    /**\r
-    * test load prototype\r
-    * \r
-    */\r
-       public function testLoadPrototype() {\r
-               \r
-               $expectedReturnValue = '<script src="contrib/prototype/prototype.js" type="text/javascript"></script>';\r
-               $this->fixture->loadPrototype();\r
-               $out = $this->fixture->render();\r
-\r
-               $this->assertContains(\r
-                       $expectedReturnValue,\r
-                       $out\r
-               );\r
-       }\r
-\r
-       /**\r
-       * test load Scriptaculous\r
-       * \r
-       */\r
-       public function testLoadScriptaculous() {\r
-               \r
-               $expectedReturnValue = '<script src="contrib/scriptaculous/scriptaculous.js?load=effects,controls,slider" type="text/javascript"></script>';\r
-               $this->fixture->loadScriptaculous('slider,controls');\r
-               $out = $this->fixture->render();\r
-\r
-               $this->assertContains(\r
-                       $expectedReturnValue,\r
-                       $out\r
-               );\r
-       }\r
-\r
-       /**\r
-       * test load ExtJS\r
-       * \r
-       */\r
-    public function testLoadExtJS() {\r
-               \r
-               $expectedReturnValue = '<script src="contrib/extjs/adapter/jquery/ext-jquery-adapter.js" type="text/javascript"></script>' . chr(10) . '<script src="contrib/extjs/ext-all.js" type="text/javascript"></script>';\r
-               $this->fixture->loadExtJS(TRUE, TRUE, 'jquery');\r
-               $out = $this->fixture->render();\r
-\r
-               $this->assertContains(\r
-                       $expectedReturnValue,\r
-                       $out\r
-               );\r
-       }\r
-       \r
-       /**\r
-       * test load ExtCore\r
-       * \r
-       */\r
-       public function testLoadExtCore() {\r
-               \r
-               $expectedReturnValue = '<script src="contrib/extjs/ext-core.js" type="text/javascript"></script>';\r
-               $this->fixture->loadExtCore();\r
-               $out = $this->fixture->render();\r
-\r
-               $this->assertContains(\r
-                       $expectedReturnValue,\r
-                       $out\r
-               );\r
-       }\r
-       \r
-       /**\r
-       * test enable ExtJsDebug  \r
-       * \r
-       */\r
-       public function testEnableExtJsDebug() {\r
-               \r
-               $expectedReturnValue = '<script src="contrib/extjs/adapter/jquery/ext-jquery-adapter.js" type="text/javascript"></script>' . chr(10) . '<script src="contrib/extjs/ext-all-debug.js" type="text/javascript"></script>';\r
-               $this->fixture->loadExtJS(TRUE, TRUE, 'jquery');\r
-               $this->fixture->enableExtJsDebug();\r
-               $out = $this->fixture->render();\r
-\r
-               $this->assertContains(\r
-                       $expectedReturnValue,\r
-                       $out\r
-               );\r
-       }\r
-       \r
-       /**\r
-       * test enable ExtCoreDebug\r
-       * \r
-       */\r
-       public function testEnableExtCoreDebug() {      \r
-               \r
-               $expectedReturnValue = '<script src="contrib/extjs/ext-core-debug.js" type="text/javascript"></script>';\r
-               $this->fixture->loadExtCore();\r
-               $this->fixture->enableExtCoreDebug();\r
-               $out = $this->fixture->render();\r
-\r
-               $this->assertContains(\r
-                       $expectedReturnValue,\r
-                       $out\r
-               );\r
-       }\r
-       \r
-       /**\r
-       * test inline language label\r
-       * \r
-       */\r
-       public function testAddInlineLanguageLabel() {\r
-               \r
-               $expectedReturnValue = 'TYPO3.lang = {"myKey":"myValue"}';\r
-               $this->fixture->loadExtJS();\r
-               $this->fixture->addInlineLanguageLabel('myKey', 'myValue');\r
-               $out = $this->fixture->enableMoveJsFromHeaderToFooter();\r
-               $out = $this->fixture->render(self::PART_FOOTER);\r
-\r
-               $this->assertContains(\r
-                       $expectedReturnValue,\r
-                       $out\r
-               );\r
-       }\r
-       \r
-       /**\r
-       * test inline language label as array\r
-       * \r
-       */\r
-       public function testAddInlineLanguageLabelArray() {\r
-               \r
-               $expectedReturnValue = 'TYPO3.lang = {"myKey1":"myValue1","myKey2":"myValue2"}';\r
-               $this->fixture->loadExtJS();\r
-               $this->fixture->addInlineLanguageLabelArray(array('myKey1' => 'myValue1', 'myKey2' => 'myValue2',));\r
-               $out = $this->fixture->enableMoveJsFromHeaderToFooter();\r
-               $out = $this->fixture->render(self::PART_FOOTER);\r
-\r
-               $this->assertContains(\r
-                       $expectedReturnValue,\r
-                       $out\r
-               );\r
-       }\r
-       \r
-       /**\r
-       * test inline language label as array get merged\r
-       * \r
-       */\r
-       public function testAddInlineLanguageLabelArrayMerged() {\r
-               \r
-               $expectedReturnValue = 'TYPO3.lang = {"myKey1":"myValue1","myKey2":"myValue2"}';\r
-               $this->fixture->loadExtJS();\r
-               $this->fixture->addInlineLanguageLabelArray(array('myKey1' => 'myValue1',));\r
-               $this->fixture->addInlineLanguageLabelArray(array('myKey2' => 'myValue2',));\r
-               $out = $this->fixture->enableMoveJsFromHeaderToFooter();\r
-               $out = $this->fixture->render(self::PART_FOOTER);\r
-\r
-               $this->assertContains(\r
-                       $expectedReturnValue,\r
-                       $out\r
-               );\r
-       }\r
-       \r
-       /**\r
-       * test inline setting\r
-       * \r
-       */\r
-       public function testAddInlineSetting() {\r
-               \r
-               $expectedReturnValue = 'TYPO3.settings = {"myApp":{"myKey":"myValue"}};';\r
-               $this->fixture->loadExtJS();\r
-               $this->fixture->addInlineSetting('myApp', 'myKey', 'myValue');\r
-               $out = $this->fixture->enableMoveJsFromHeaderToFooter();\r
-               $out = $this->fixture->render(self::PART_FOOTER);\r
-\r
-               $this->assertContains(\r
-                       $expectedReturnValue,\r
-                       $out\r
-               );\r
-       }\r
-       \r
-       /**\r
-       * test inline settings with array\r
-       * \r
-       */\r
-       public function testAddInlineSettingArray() {\r
-               \r
-               $expectedReturnValue = 'TYPO3.settings = {"myApp":{"myKey1":"myValue1","myKey2":"myValue2"}};';\r
-               $this->fixture->loadExtJS();\r
-               $this->fixture->addInlineSettingArray('myApp', array('myKey1' => 'myValue1', 'myKey2' => 'myValue2',));\r
-               $out = $this->fixture->enableMoveJsFromHeaderToFooter();\r
-               $out = $this->fixture->render(self::PART_FOOTER);\r
-\r
-               $this->assertContains(\r
-                       $expectedReturnValue,\r
-                       $out\r
-               );\r
-       }\r
-       \r
-       /**\r
-       * test inline settings with array get merged\r
-       * \r
-       */\r
-       public function testAddInlineSettingArrayMerged() {\r
-               \r
-               $expectedReturnValue = 'TYPO3.settings = {"myApp":{"myKey1":"myValue1","myKey2":"myValue2"}};';\r
-               $this->fixture->loadExtJS();\r
-               $this->fixture->addInlineSettingArray('myApp', array('myKey1' => 'myValue1',));\r
-               $this->fixture->addInlineSettingArray('myApp', array('myKey2' => 'myValue2',));\r
-               $out = $this->fixture->enableMoveJsFromHeaderToFooter();\r
-               $out = $this->fixture->render(self::PART_FOOTER);\r
-\r
-               $this->assertContains(\r
-                       $expectedReturnValue,\r
-                       $out\r
-               );\r
-       }\r
-       \r
-       /**\r
-       * test add body content\r
-       * \r
-       */\r
-       public function testAddBodyContent() {\r
-               $expectedReturnValue = 'ABCDE';\r
-               $this->fixture->addBodyContent('A');\r
-               $this->fixture->addBodyContent('B');\r
-               $this->fixture->addBodyContent('C');\r
-               $this->fixture->addBodyContent('D');\r
-               $this->fixture->addBodyContent('E');\r
-               \r
-               $out = $this->fixture->getBodyContent();\r
-               $this->assertEquals(\r
-                       $expectedReturnValue,\r
-                       $out\r
-               );\r
-       }\r
-       \r
-       \r
-       /**\r
-       * test set body content\r
-       * \r
-       */\r
-       public function testSetBodyContent() {\r
-               $expectedReturnValue = 'ABCDE';\r
-               $this->fixture->setBodyContent('ABCDE');\r
-               \r
-               $out = $this->fixture->getBodyContent();\r
-               $this->assertEquals(\r
-                       $expectedReturnValue,\r
-                       $out\r
-               );\r
-               \r
-               $out = $this->fixture->render();\r
-\r
-               $this->assertContains(\r
-                       $expectedReturnValue,\r
-                       $out\r
-               );\r
-       }\r
-       \r
-  \r
-\r
-}\r
+<?php
+/***************************************************************
+* Copyright notice
+*
+* (c) 2009 Steffen Kamper (info@sk-typo3.de)
+* All rights reserved
+*
+* This script is part of the TYPO3 project. The TYPO3 project is
+* free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the License or
+* (at your option) any later version.
+*
+* The GNU General Public License can be found at
+* http://www.gnu.org/copyleft/gpl.html.
+*
+* This script is distributed in the hope that it will be useful
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+
+
+/**
+ * Testcase for the t3lib_pageIncludes class in the TYPO3 core.
+ *
+ * @package TYPO3
+ * @subpackage t3lib
+ *
+ * @author Steffen Kamper (info@sk-typo3.de)
+ */
+class t3lib_PageRenderer_testcase extends tx_phpunit_testcase {
+       /**
+        * @var t3lib_pageIncludes
+        */
+       private $fixture;
+
+       const PART_COMPLETE = 0;
+       const PART_HEADER = 1;
+       const PART_FOOTER = 2;
+
+       public function setUp() {
+               $className = 't3lib_PageRenderer_' . uniqid('test');
+               eval('
+                       class ' . $className . ' extends t3lib_PageRenderer {
+                       }
+               ');
+               $this->fixture = new $className();
+       }
+
+       public function tearDown() {
+               unset(
+                       $this->fixture
+               );
+       }
+
+
+       //////////////////////////////////////
+       // Tests for the basic functionality
+       //////////////////////////////////////
+
+       /**
+        * @test
+        */
+       public function fixtureCanBeCreated() {
+               $this->assertTrue(
+                       $this->fixture instanceof t3lib_PageRenderer
+               );
+       }
+       
+       //////////////////////
+       // test functions
+       //////////////////////
+
+       /**
+       * test set xml prolog and doctype
+       * 
+       */
+       public function testSetXmlPrologAndDocType() {
+               
+               $expectedReturnValue = '<?xml version="1.0" encoding="utf-8" ?>';
+               $this->fixture->setXmlPrologAndDocType('<?xml version="1.0" encoding="utf-8" ?>');
+               $out = $this->fixture->render();
+
+               $this->assertContains(
+                       $expectedReturnValue,
+                       $out
+               );
+       }
+
+       /**
+       * test set title
+       * 
+       */
+       public function testSetTitle() {
+               
+               $expectedReturnValue = '<title>This is the title</title>';
+               $this->fixture->setTitle('This is the title');
+               $out = $this->fixture->render();
+
+               $this->assertContains(
+                       $expectedReturnValue,
+                       $out
+               );
+       }
+
+       /**
+       * test set charset
+       * 
+       */
+       public function testSetCharset() {
+               
+               $expectedReturnValue = '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />';
+               $this->fixture->setCharset('utf-8');
+               $out = $this->fixture->render();
+
+               $this->assertContains(
+                       $expectedReturnValue,
+                       $out
+               );
+       }
+
+       /**
+       * test set favicon
+       * 
+       */
+       public function testSetFavIcon() {
+               
+               $expectedReturnValue1 = '<link rel="shortcut icon" href="http://google.com/favicon.ico" />';
+               $expectedReturnValue2 = '<link rel="icon" href="http://google.com/favicon.ico" />';
+               $this->fixture->setFavIcon('http://google.com/favicon.ico');
+               $out = $this->fixture->render();
+
+               $this->assertContains(
+                       $expectedReturnValue1,
+                       $out
+               );
+               $this->assertContains(
+                       $expectedReturnValue2,
+                       $out
+               );
+               
+       }
+
+       /**
+       * test set baseUrl
+       * 
+       */
+       public function testSetBaseUrl() {
+               
+               $expectedReturnValue = '<base href="http://ggogle.com/" />';
+               $this->fixture->setBaseUrl('http://ggogle.com/');
+               $out = $this->fixture->render();
+
+               $this->assertContains(
+                       $expectedReturnValue,
+                       $out
+               );
+       }
+
+       /**
+       * test add meta tag
+       * 
+       */
+       public function testAddMetaTag() {
+               
+               $expectedReturnValue = '<meta name="author" content="Anna Lyse">';
+               $this->fixture->addMetaTag('<meta name="author" content="Anna Lyse">');
+               $out = $this->fixture->render();
+
+               $this->assertContains(
+                       $expectedReturnValue,
+                       $out
+               );
+       }
+
+       /**
+       * test add inline comment
+       * 
+       */
+       public function testAddInlineComment() {
+               
+               $expectedReturnValue = 'this is an inline comment written by unit test';
+               $this->fixture->addInlineComment('this is an inline comment written by unit test');
+               $out = $this->fixture->render();
+
+               $this->assertContains(
+                       $expectedReturnValue,
+                       $out
+               );
+       }
+
+       /**
+       * test add header data
+       * 
+       */
+       public function testAddHeaderData() {
+               
+               $expectedReturnValue = '<tag method="private" name="test" />';
+               $this->fixture->addHeaderData('<tag method="private" name="test" />');
+               $out = $this->fixture->render();
+
+               $this->assertContains(
+                       $expectedReturnValue,
+                       $out
+               );
+       }
+
+       /**
+       * test add footer data
+       * 
+       */
+       public function testAddFooterData() {
+               
+               $expectedReturnValue = '<tag method="private" name="test" />';
+               $this->fixture->addFooterData('<tag method="private" name="test" />');
+               $out = $this->fixture->render(self::PART_FOOTER);
+
+               $this->assertContains(
+                       $expectedReturnValue,
+                       $out
+               );
+       }
+
+       /**
+       * test add JS library file
+       * 
+       */
+       public function testAddJsLibrary() {
+               
+               $expectedReturnValue = '<script src="fileadmin/test.js" type="text/javascript"></script>';
+               $this->fixture->addJsLibrary('test', 'fileadmin/test.js');
+               $out = $this->fixture->render();
+
+               $this->assertContains(
+                       $expectedReturnValue,
+                       $out
+               );
+       }
+       
+       
+       /**
+       * test add JS footer library file
+       * 
+       */
+       public function testAddJsFooterLibrary() {
+               
+               $expectedReturnValue = '<script src="fileadmin/test.js" type="text/javascript"></script>';
+               $this->fixture->addJsFooterLibrary('test', 'fileadmin/test.js');
+               $out = $this->fixture->render(self::PART_FOOTER);
+
+               $this->assertContains(
+                       $expectedReturnValue,
+                       $out
+               );
+       }
+
+       /**
+       * test add JS file
+       * 
+       */
+       public function testAddJsFile() {
+               
+               $expectedReturnValue = '<script src="fileadmin/test.js" type="text/javascript"></script>';
+               $this->fixture->addJsFile('fileadmin/test.js');
+               $out = $this->fixture->render();
+
+               $this->assertContains(
+                       $expectedReturnValue,
+                       $out
+               );
+       }
+
+       /**
+       * test add JS file for footer
+       * 
+       */
+       public function testAddJsFooterFile() {
+               
+               $expectedReturnValue = '<script src="fileadmin/test.js" type="text/javascript"></script>';
+               $this->fixture->addJsFooterFile('fileadmin/test.js');
+               $out = $this->fixture->render(self::PART_FOOTER);
+
+               $this->assertContains(
+                       $expectedReturnValue,
+                       $out
+               );
+       }
+
+       /**
+       * test add JS inline
+       * 
+       */
+       public function testAddJsInlineCode() {
+               
+               $expectedReturnValue = 'var x = "testvar"';
+               $this->fixture->addJsInlineCode('test', 'var x = "testvar"');
+               $out = $this->fixture->render();
+
+               $this->assertContains(
+                       $expectedReturnValue,
+                       $out
+               );
+       }
+
+       /**
+       * test add JS inline for footer
+       * 
+       */
+       public function testAddJsFooterInlineCode() {
+               
+               $expectedReturnValue = 'var x = "testvar"';
+               $this->fixture->addJsFooterInlineCode('test', 'var x = "testvar"');
+               $out = $this->fixture->render(self::PART_FOOTER);
+
+               $this->assertContains(
+                       $expectedReturnValue,
+                       $out
+               );
+       }
+
+       /**
+       * test add JS handler
+       * 
+       */
+       public function testAddExtOnReadyCode() {
+               
+               $expectedReturnValue1 = 'Ext.onReady(function() {';
+               $expectedReturnValue2 = 'var x = "testvar";';
+               $this->fixture->loadExtJS();
+               $this->fixture->addExtOnReadyCode('var x = "testvar";');
+               $out = $this->fixture->render();
+
+               $this->assertContains(
+                       $expectedReturnValue1,
+                       $out
+               );
+               
+               $this->assertContains(
+                       $expectedReturnValue2,
+                       $out
+               );
+               
+       }
+
+       /**
+       * test add CSS file
+       * 
+       */
+       public function testAddCssFile() {
+               
+               $expectedReturnValue = '<link rel="stylesheet" type="text/css" href="fileadmin/test.css" media="screen" />';
+               $this->fixture->addCssFile('fileadmin/test.css');
+               $out = $this->fixture->render();
+
+               $this->assertContains(
+                       $expectedReturnValue,
+                       $out
+               );
+       }
+
+       /**
+       * test add CSS inline
+       * 
+       */
+       public function testAddCssInlineBlock() {
+               
+               $expectedReturnValue = 'body {margin:20px;}';
+               $this->fixture->addCssInlineBlock('general', 'body {margin:20px;}');
+               $out = $this->fixture->render();
+
+               $this->assertContains(
+                       $expectedReturnValue,
+                       $out
+               );
+       }
+
+       /**
+       * test add CSS inline and force on top
+       * 
+       */
+       public function testAddCssInlineBlockForceOnTop() {
+               
+               $expectedReturnValue = '/*general1*/' . chr(10) . 'h1 {margin:20px;}' . chr(10) . '/*general*/' . chr(10) . 'body {margin:20px;}';
+               $this->fixture->addCssInlineBlock('general', 'body {margin:20px;}');
+               $this->fixture->addCssInlineBlock('general1', 'h1 {margin:20px;}', NULL, TRUE);
+               $out = $this->fixture->render();
+
+               $this->assertContains(
+                       $expectedReturnValue,
+                       $out
+               );
+       }
+
+    /**
+    * test load prototype
+    * 
+    */
+       public function testLoadPrototype() {
+               
+               $expectedReturnValue = '<script src="contrib/prototype/prototype.js" type="text/javascript"></script>';
+               $this->fixture->loadPrototype();
+               $out = $this->fixture->render();
+
+               $this->assertContains(
+                       $expectedReturnValue,
+                       $out
+               );
+       }
+
+       /**
+       * test load Scriptaculous
+       * 
+       */
+       public function testLoadScriptaculous() {
+               
+               $expectedReturnValue = '<script src="contrib/scriptaculous/scriptaculous.js?load=effects,controls,slider" type="text/javascript"></script>';
+               $this->fixture->loadScriptaculous('slider,controls');
+               $out = $this->fixture->render();
+
+               $this->assertContains(
+                       $expectedReturnValue,
+                       $out
+               );
+       }
+
+       /**
+       * test load ExtJS
+       * 
+       */
+    public function testLoadExtJS() {
+               
+               $expectedReturnValue = '<script src="contrib/extjs/adapter/jquery/ext-jquery-adapter.js" type="text/javascript"></script>' . chr(10) . '<script src="contrib/extjs/ext-all.js" type="text/javascript"></script>';
+               $this->fixture->loadExtJS(TRUE, TRUE, 'jquery');
+               $out = $this->fixture->render();
+
+               $this->assertContains(
+                       $expectedReturnValue,
+                       $out
+               );
+       }
+       
+       /**
+       * test load ExtCore
+       * 
+       */
+       public function testLoadExtCore() {
+               
+               $expectedReturnValue = '<script src="contrib/extjs/ext-core.js" type="text/javascript"></script>';
+               $this->fixture->loadExtCore();
+               $out = $this->fixture->render();
+
+               $this->assertContains(
+                       $expectedReturnValue,
+                       $out
+               );
+       }
+       
+       /**
+       * test enable ExtJsDebug  
+       * 
+       */
+       public function testEnableExtJsDebug() {
+               
+               $expectedReturnValue = '<script src="contrib/extjs/adapter/jquery/ext-jquery-adapter.js" type="text/javascript"></script>' . chr(10) . '<script src="contrib/extjs/ext-all-debug.js" type="text/javascript"></script>';
+               $this->fixture->loadExtJS(TRUE, TRUE, 'jquery');
+               $this->fixture->enableExtJsDebug();
+               $out = $this->fixture->render();
+
+               $this->assertContains(
+                       $expectedReturnValue,
+                       $out
+               );
+       }
+       
+       /**
+       * test enable ExtCoreDebug
+       * 
+       */
+       public function testEnableExtCoreDebug() {      
+               
+               $expectedReturnValue = '<script src="contrib/extjs/ext-core-debug.js" type="text/javascript"></script>';
+               $this->fixture->loadExtCore();
+               $this->fixture->enableExtCoreDebug();
+               $out = $this->fixture->render();
+
+               $this->assertContains(
+                       $expectedReturnValue,
+                       $out
+               );
+       }
+       
+       /**
+       * test inline language label
+       * 
+       */
+       public function testAddInlineLanguageLabel() {
+               
+               $expectedReturnValue = 'TYPO3.lang = {"myKey":"myValue"}';
+               $this->fixture->loadExtJS();
+               $this->fixture->addInlineLanguageLabel('myKey', 'myValue');
+               $out = $this->fixture->enableMoveJsFromHeaderToFooter();
+               $out = $this->fixture->render(self::PART_FOOTER);
+
+               $this->assertContains(
+                       $expectedReturnValue,
+                       $out
+               );
+       }
+       
+       /**
+       * test inline language label as array
+       * 
+       */
+       public function testAddInlineLanguageLabelArray() {
+               
+               $expectedReturnValue = 'TYPO3.lang = {"myKey1":"myValue1","myKey2":"myValue2"}';
+               $this->fixture->loadExtJS();
+               $this->fixture->addInlineLanguageLabelArray(array('myKey1' => 'myValue1', 'myKey2' => 'myValue2',));
+               $out = $this->fixture->enableMoveJsFromHeaderToFooter();
+               $out = $this->fixture->render(self::PART_FOOTER);
+
+               $this->assertContains(
+                       $expectedReturnValue,
+                       $out
+               );
+       }
+       
+       /**
+       * test inline language label as array get merged
+       * 
+       */
+       public function testAddInlineLanguageLabelArrayMerged() {
+               
+               $expectedReturnValue = 'TYPO3.lang = {"myKey1":"myValue1","myKey2":"myValue2"}';
+               $this->fixture->loadExtJS();
+               $this->fixture->addInlineLanguageLabelArray(array('myKey1' => 'myValue1',));
+               $this->fixture->addInlineLanguageLabelArray(array('myKey2' => 'myValue2',));
+               $out = $this->fixture->enableMoveJsFromHeaderToFooter();
+               $out = $this->fixture->render(self::PART_FOOTER);
+
+               $this->assertContains(
+                       $expectedReturnValue,
+                       $out
+               );
+       }
+       
+       /**
+       * test inline setting
+       * 
+       */
+       public function testAddInlineSetting() {
+               
+               $expectedReturnValue = 'TYPO3.settings = {"myApp":{"myKey":"myValue"}};';
+               $this->fixture->loadExtJS();
+               $this->fixture->addInlineSetting('myApp', 'myKey', 'myValue');
+               $out = $this->fixture->enableMoveJsFromHeaderToFooter();
+               $out = $this->fixture->render(self::PART_FOOTER);
+
+               $this->assertContains(
+                       $expectedReturnValue,
+                       $out
+               );
+       }
+       
+       /**
+       * test inline settings with array
+       * 
+       */
+       public function testAddInlineSettingArray() {
+               
+               $expectedReturnValue = 'TYPO3.settings = {"myApp":{"myKey1":"myValue1","myKey2":"myValue2"}};';
+               $this->fixture->loadExtJS();
+               $this->fixture->addInlineSettingArray('myApp', array('myKey1' => 'myValue1', 'myKey2' => 'myValue2',));
+               $out = $this->fixture->enableMoveJsFromHeaderToFooter();
+               $out = $this->fixture->render(self::PART_FOOTER);
+
+               $this->assertContains(
+                       $expectedReturnValue,
+                       $out
+               );
+       }
+       
+       /**
+       * test inline settings with array get merged
+       * 
+       */
+       public function testAddInlineSettingArrayMerged() {
+               
+               $expectedReturnValue = 'TYPO3.settings = {"myApp":{"myKey1":"myValue1","myKey2":"myValue2"}};';
+               $this->fixture->loadExtJS();
+               $this->fixture->addInlineSettingArray('myApp', array('myKey1' => 'myValue1',));
+               $this->fixture->addInlineSettingArray('myApp', array('myKey2' => 'myValue2',));
+               $out = $this->fixture->enableMoveJsFromHeaderToFooter();
+               $out = $this->fixture->render(self::PART_FOOTER);
+
+               $this->assertContains(
+                       $expectedReturnValue,
+                       $out
+               );
+       }
+       
+       /**
+       * test add body content
+       * 
+       */
+       public function testAddBodyContent() {
+               $expectedReturnValue = 'ABCDE';
+               $this->fixture->addBodyContent('A');
+               $this->fixture->addBodyContent('B');
+               $this->fixture->addBodyContent('C');
+               $this->fixture->addBodyContent('D');
+               $this->fixture->addBodyContent('E');
+               
+               $out = $this->fixture->getBodyContent();
+               $this->assertEquals(
+                       $expectedReturnValue,
+                       $out
+               );
+       }
+       
+       
+       /**
+       * test set body content
+       * 
+       */
+       public function testSetBodyContent() {
+               $expectedReturnValue = 'ABCDE';
+               $this->fixture->setBodyContent('ABCDE');
+               
+               $out = $this->fixture->getBodyContent();
+               $this->assertEquals(
+                       $expectedReturnValue,
+                       $out
+               );
+               
+               $out = $this->fixture->render();
+
+               $this->assertContains(
+                       $expectedReturnValue,
+                       $out
+               );
+       }
+       
+  
+
+}
 ?>
\ No newline at end of file