tx_fluid: (fresh backport from Fluid Package r2609 with FluidBackporter r2611):
authorBastian Waidelich <bastian@typo3.org>
Mon, 15 Jun 2009 12:03:04 +0000 (12:03 +0000)
committerBastian Waidelich <bastian@typo3.org>
Mon, 15 Jun 2009 12:03:04 +0000 (12:03 +0000)
  [FIX] Fluid (Core): Set controller context only if not null. This needs to be done for rendering contexts without a controller context  (e.g. in a service)
  [TASK] Fluid (Core): Fixed a few doc comments
  [TASK] Fluid (Core): Removed commented-out code as it was obsolete

other changes in tx_fluid:
  * AbstractFormViewHelper: Removed persistenceManager-dependency. getName() and getValue() now return correct values for domain objects. Resolves #3651
  * Adjusted doc comments of ImageViewHelper. Resolves #3394
  * Fixed a few more doc comments

44 files changed:
typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/ViewHelperNode.php
typo3/sysext/fluid/Classes/Core/Rendering/HTMLSpecialCharsPostProcessor.php
typo3/sysext/fluid/Classes/Core/Rendering/ObjectAccessorPostProcessorInterface.php
typo3/sysext/fluid/Classes/ViewHelpers/Form/AbstractFormViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Format/HtmlViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/ImageViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Link/ActionViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Uri/ActionViewHelper.php
typo3/sysext/fluid/Tests/Core/Parser/SyntaxTree/AbstractNodeTest_testcase.php
typo3/sysext/fluid/Tests/Core/Parser/SyntaxTree/ObjectAccessorNodeTest_testcase.php
typo3/sysext/fluid/Tests/Core/Parser/SyntaxTree/TextNodeTest_testcase.php
typo3/sysext/fluid/Tests/Core/Parser/SyntaxTree/ViewHelperNodeComparatorTest_testcase.php
typo3/sysext/fluid/Tests/Core/Parser/SyntaxTree/ViewHelperNodeTest_testcase.php
typo3/sysext/fluid/Tests/Core/Parser/TemplateParserPatternTest_testcase.php
typo3/sysext/fluid/Tests/Core/ParsingStateTest_testcase.php
typo3/sysext/fluid/Tests/Core/Rendering/HTMLSpecialCharsPostProcessorTest_testcase.php
typo3/sysext/fluid/Tests/Core/Rendering/RenderingConfigurationTest_testcase.php
typo3/sysext/fluid/Tests/Core/Rendering/RenderingContextTest_testcase.php
typo3/sysext/fluid/Tests/Core/TagBasedViewHelperTest_testcase.php
typo3/sysext/fluid/Tests/Core/TagBuilderTest_testcase.php
typo3/sysext/fluid/Tests/Core/TemplateParserTest_testcase.php
typo3/sysext/fluid/Tests/Core/VariableContainerTest_testcase.php
typo3/sysext/fluid/Tests/Core/ViewHelper/AbstractViewHelperTest_testcase.php
typo3/sysext/fluid/Tests/Core/ViewHelper/ArgumentDefinitionTest_testcase.php
typo3/sysext/fluid/Tests/Core/ViewHelper/ViewHelperVariableContainerTest_testcase.php
typo3/sysext/fluid/Tests/ViewHelpers/BaseViewHelperTest_testcase.php
typo3/sysext/fluid/Tests/ViewHelpers/ForViewHelperTest_testcase.php
typo3/sysext/fluid/Tests/ViewHelpers/Form/AbstractFormViewHelperTest_testcase.php
typo3/sysext/fluid/Tests/ViewHelpers/Form/SelectViewHelperTest_testcase.php
typo3/sysext/fluid/Tests/ViewHelpers/Form/TextareaViewHelperTest_testcase.php
typo3/sysext/fluid/Tests/ViewHelpers/Form/TextboxViewHelperTest_testcase.php
typo3/sysext/fluid/Tests/ViewHelpers/Format/CurrencyViewHelperTest_testcase.php
typo3/sysext/fluid/Tests/ViewHelpers/Format/DateViewHelperTest_testcase.php
typo3/sysext/fluid/Tests/ViewHelpers/Format/Nl2brViewHelperTest_testcase.php
typo3/sysext/fluid/Tests/ViewHelpers/Format/NumberViewHelperTest_testcase.php
typo3/sysext/fluid/Tests/ViewHelpers/Format/PrintfViewHelperTest_testcase.php
typo3/sysext/fluid/Tests/ViewHelpers/IfViewHelperTest_testcase.php
typo3/sysext/fluid/Tests/ViewHelpers/Link/ActionViewHelperTest_testcase.php
typo3/sysext/fluid/Tests/ViewHelpers/Link/EmailViewHelperTest_testcase.php
typo3/sysext/fluid/Tests/ViewHelpers/Link/ExternalViewHelperTest_testcase.php
typo3/sysext/fluid/Tests/ViewHelpers/Uri/ActionViewHelperTest_testcase.php
typo3/sysext/fluid/Tests/ViewHelpers/Uri/EmailViewHelperTest_testcase.php
typo3/sysext/fluid/Tests/ViewHelpers/Uri/ExternalViewHelperTest_testcase.php
typo3/sysext/fluid/Tests/ViewHelpers/ViewHelperBaseTestcase.php

index d9edb44..9e5e955 100644 (file)
@@ -23,7 +23,7 @@
 /**
  * @package Fluid
  * @subpackage Core
- * @version $Id: ViewHelperNode.php 2575 2009-06-06 06:45:41Z sebastian $
+ * @version $Id: ViewHelperNode.php 2607 2009-06-14 22:58:59Z networkteam_hlubek $
  */
 
 /**
@@ -31,7 +31,7 @@
  *
  * @package Fluid
  * @subpackage Core
- * @version $Id: ViewHelperNode.php 2575 2009-06-06 06:45:41Z sebastian $
+ * @version $Id: ViewHelperNode.php 2607 2009-06-14 22:58:59Z networkteam_hlubek $
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @scope prototype
  * @intenral
@@ -143,12 +143,13 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode extends Tx_Fluid_Core_Parse
                                }
                        }
                }
-               //$this->renderingContext->setObjectAccessorPostProcessorEnabled(TRUE);
 
                $viewHelperArguments = $objectFactory->create('Tx_Fluid_Core_ViewHelper_Arguments', $evaluatedArguments);
                $viewHelper->setArguments($viewHelperArguments);
                $viewHelper->setTemplateVariableContainer($this->renderingContext->getTemplateVariableContainer());
-               $viewHelper->setControllerContext($this->renderingContext->getControllerContext());
+               if ($this->renderingContext->getControllerContext() !== NULL) {
+                       $viewHelper->setControllerContext($this->renderingContext->getControllerContext());
+               }
                $viewHelper->setViewHelperVariableContainer($this->renderingContext->getViewHelperVariableContainer());
                $viewHelper->setViewHelperNode($this);
 
@@ -233,10 +234,8 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode extends Tx_Fluid_Core_Parse
                        $childNode->setRenderingContext($this->renderingContext);
 
                        if ($childNode instanceof Tx_Fluid_Core_Parser_SyntaxTree_TextNode && !preg_match(str_replace('COMPARATORS', implode('|', self::$comparators), self::$booleanExpressionTextNodeCheckerRegularExpression), $childNode->evaluate())) {
-                               //throw new Tx_Fluid_Core_RuntimeException('The subexpression "' . $childNode->evaluate() . '" contains invalid characters.', 1244202549);
                                $comparator = NULL;
                                break; // skip loop and fall back to classical to boolean conversion.
-                               // TODO: Check if this really makes sense
                        }
 
                        if ($comparator !== NULL) {
index 9b815ae..95b0507 100644 (file)
@@ -23,7 +23,7 @@
 /**
  * @package Fluid
  * @subpackage Core
- * @version $Id: HTMLSpecialCharsPostProcessor.php 2575 2009-06-06 06:45:41Z sebastian $
+ * @version $Id: HTMLSpecialCharsPostProcessor.php 2604 2009-06-12 11:53:05Z sebastian $
  */
 
 /**
@@ -31,7 +31,7 @@
  *
  * @package Fluid
  * @subpackage Core
- * @version $Id: HTMLSpecialCharsPostProcessor.php 2575 2009-06-06 06:45:41Z sebastian $
+ * @version $Id: HTMLSpecialCharsPostProcessor.php 2604 2009-06-12 11:53:05Z sebastian $
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @internal
  * @scope prototype
@@ -43,14 +43,14 @@ class Tx_Fluid_Core_Rendering_HTMLSpecialCharsPostProcessor implements Tx_Fluid_
         * NOT part of public API.
         *
         * @param mixed $object the object that is currently rendered
-        * @param boolean $currentlyEvaluatingArguments TRUE if the current ObjectAccessorNode is within view helper arguments
+        * @param boolean $enabled TRUE if post processing is currently enabled.
         * @return mixed $object the original object. If not within arguments and of type string, the value is htmlspecialchar'ed
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         * @author Bastian Waidelich <bastian@typo3.org>
         * @internal
         */
        public function process($object, $enabled) {
-               if ($enabled && is_string($object)) {
+               if ($enabled === TRUE && is_string($object)) {
                        return htmlspecialchars($object);
                }
                return $object;
index e7af4f9..20aa658 100644 (file)
@@ -23,7 +23,7 @@
 /**
  * @package Fluid
  * @subpackage Core
- * @version $Id: ObjectAccessorPostProcessorInterface.php 2575 2009-06-06 06:45:41Z sebastian $
+ * @version $Id: ObjectAccessorPostProcessorInterface.php 2604 2009-06-12 11:53:05Z sebastian $
  */
 
 /**
@@ -31,7 +31,7 @@
  *
  * @package Fluid
  * @subpackage Core
- * @version $Id: ObjectAccessorPostProcessorInterface.php 2575 2009-06-06 06:45:41Z sebastian $
+ * @version $Id: ObjectAccessorPostProcessorInterface.php 2604 2009-06-12 11:53:05Z sebastian $
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @internal
  */
@@ -40,7 +40,7 @@ interface Tx_Fluid_Core_Rendering_ObjectAccessorPostProcessorInterface {
         * Post-Process an Object Accessor
         *
         * @param mixed $object the object that is currently rendered
-        * @param boolean $currentlyEvaluatingArguments TRUE if the current ObjectAccessorNode is within view helper arguments
+        * @param boolean $enabled TRUE if post processing is currently enabled.
         * @return mixed $object the original object. If not within arguments and of type string, the value is htmlspecialchar'ed
         * @internal
         */
index adb1342..2c83f8c 100644 (file)
 abstract class Tx_Fluid_ViewHelpers_Form_AbstractFormViewHelper extends Tx_Fluid_Core_ViewHelper_TagBasedViewHelper {
 
        /**
-        * @var Tx_Fluid_Persistence_ManagerInterface
-        */
-       protected $persistenceManager;
-
-       /**
-        * Injects the FLOW3 Persistence Manager
-        *
-        * @param Tx_Fluid_Persistence_ManagerInterface $persistenceManager
-        * @return void
-        * @author Robert Lemke <robert@typo3.org>
-        * @internal
-        */
-       public function injectPersistenceManager(Tx_Fluid_Persistence_ManagerInterface $persistenceManager) {
-               $this->persistenceManager = $persistenceManager;
-       }
-
-       /**
         * Initialize arguments.
         *
         * @return void
@@ -78,11 +61,12 @@ abstract class Tx_Fluid_ViewHelpers_Form_AbstractFormViewHelper extends Tx_Fluid
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         * @author Robert Lemke <robert@typo3.org>
         * @author Karsten Dambekalns <karsten@typo3.org>
+        * @author Bastian Waidelich <bastian@typo3.org>
         */
        protected function getName() {
                $name = ($this->isObjectAccessorMode()) ? $this->viewHelperVariableContainer->get('Tx_Fluid_ViewHelpers_FormViewHelper', 'formName') . '[' . $this->arguments['property'] . ']' : $this->arguments['name'];
-               if (is_object($this->arguments['value']) && NULL !== $this->persistenceManager->getBackend()->getUUIDByObject($this->arguments['value'])) {
-                       $name .= '[__identity]';
+               if (is_object($this->arguments['value']) && is_callable(array($this->arguments['value'], 'getUid'))) {
+                       $name .= '[uid]';
                }
                return $name;
        }
@@ -94,18 +78,16 @@ abstract class Tx_Fluid_ViewHelpers_Form_AbstractFormViewHelper extends Tx_Fluid
         * @return string Value
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         * @author Robert Lemke <robert@typo3.org>
+        * @author Bastian Waidelich <bastian@typo3.org>
         */
        protected function getValue() {
                if ($this->isObjectAccessorMode() && $this->viewHelperVariableContainer->exists('Tx_Fluid_ViewHelpers_FormViewHelper', 'formObject') && ($this->arguments['value'] === NULL)) {
                        $value = $this->getObjectValue($this->viewHelperVariableContainer->get('Tx_Fluid_ViewHelpers_FormViewHelper', 'formObject'), $this->arguments['property']);
                } else {
-                       $value =  $this->arguments['value'];
+                       $value = $this->arguments['value'];
                }
-               if (is_object($value)) {
-                       $uuid = $this->persistenceManager->getBackend()->getUUIDByObject($value);
-                       if ($uuid !== NULL) {
-                               $value = $uuid;
-                       }
+               if (is_object($this->arguments['value']) && is_callable(array($this->arguments['value'], 'getUid'))) {
+                       $value = $this->arguments['value']->getUid();
                }
                return $value;
        }
index 4673aed..4639afa 100644 (file)
  * Example:
  *
  * (1) default parameters:
- * <f:html>foo <b>bar</b>. Some <LINK 1>link</LINK>.</f:html>
+ * <f:format.html>foo <b>bar</b>. Some <LINK 1>link</LINK>.</f:format.html>
  *
  * Result:
  * <p class="bodytext">foo <b>bar</b>. Some <a href="index.php?id=1" >link</a>.</p>
  * (depending on your TYPO3 setup)
  *
  * (2) custom parseFunc
- * <f:html parseFuncTSPath="lib.parseFunc">foo <b>bar</b>. Some <LINK 1>link</LINK>.</f:html>
+ * <f:format.html parseFuncTSPath="lib.parseFunc">foo <b>bar</b>. Some <LINK 1>link</LINK>.</f:format.html>
  *
  * Output:
  * foo <b>bar</b>. Some <a href="index.php?id=1" >link</a>.
index f4bddeb..f460123 100644 (file)
@@ -70,8 +70,8 @@ class Tx_Fluid_ViewHelpers_ImageViewHelper extends Tx_Fluid_Core_ViewHelper_TagB
         * @see http://typo3.org/documentation/document-library/references/doc_core_tsref/4.2.0/view/1/5/#id4164427
         * 
         * @param string $src
-        * @param string $width width of the image. See imgResource.width for possible values.
-        * @param string $height height of the image. See imgResource.height for possible values.
+        * @param string $width width of the image. This can be a numeric value representing the fixed width of the image in pixels. But you can also perform simple calculations by adding "m" or "c" to the value. See imgResource.width for possible options.
+        * @param string $height height of the image. This can be a numeric value representing the fixed height of the image in pixels. But you can also perform simple calculations by adding "m" or "c" to the value. See imgResource.width for possible options.
         * @param integer $minWidth minimum width of the image
         * @param integer $minHeight minimum height of the image
         * @param integer $maxWidth maximum width of the image
index 7551b2a..5df8941 100644 (file)
@@ -63,7 +63,7 @@ class Tx_Fluid_ViewHelpers_Link_ActionViewHelper extends Tx_Fluid_Core_ViewHelpe
         * @param boolean $noCacheHash set this to supress the cHash query parameter created by TypoLink. You should not need this.
         * @param string $section the anchor to be added to the URI
         * @param boolean $linkAccessRestrictedPages If set, links pointing to access restricted pages will still link to the page even though the page cannot be accessed.
-        * @param array $additionalParams additional query parameters that won't be prefixed like $arguments
+        * @param array $additionalParams additional query parameters that won't be prefixed like $arguments (overrule $arguments)
         * @return string Rendered link
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         * @author Bastian Waidelich <bastian@typo3.org>
index 65d51b1..20f7448 100644 (file)
@@ -50,7 +50,7 @@ class Tx_Fluid_ViewHelpers_Uri_ActionViewHelper extends Tx_Fluid_Core_ViewHelper
         * @param boolean $noCacheHash set this to supress the cHash query parameter created by TypoLink. You should not need this.
         * @param string $section the anchor to be added to the URI
         * @param boolean $linkAccessRestrictedPages If set, links pointing to access restricted pages will still link to the page even though the page cannot be accessed.
-        * @param array $additionalParams additional query parameters that won't be prefixed like $arguments
+        * @param array $additionalParams additional query parameters that won't be prefixed like $arguments (overrule $arguments)
         * @return string Rendered link
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         * @author Bastian Waidelich <bastian@typo3.org>
index e031ad4..3d184d2 100644 (file)
@@ -41,7 +41,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_AbstractNodeTest_testcase extends Tx_Extba
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_evaluateChildNodesPassesRenderingContextToChildNodes() {
+       public function evaluateChildNodesPassesRenderingContextToChildNodes() {
                $this->childNode->expects($this->once())->method('setRenderingContext')->with($this->renderingContext);
                $this->abstractNode->evaluateChildNodes();
        }
@@ -50,7 +50,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_AbstractNodeTest_testcase extends Tx_Extba
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_childNodeCanBeReadOutAgain() {
+       public function childNodeCanBeReadOutAgain() {
                $this->assertSame($this->abstractNode->getChildNodes(), array($this->childNode));
        }
 }
index ec0d23a..5826139 100644 (file)
@@ -16,7 +16,7 @@
 /**
  * @package Fluid
  * @subpackage Tests
- * @version $Id: ObjectAccessorNodeTest.php 2340 2009-05-22 14:12:18Z sebastian $
+ * @version $Id: ObjectAccessorNodeTest.php 2588 2009-06-09 19:21:45Z sebastian $
  */
 
 require_once(dirname(__FILE__) . '/../Fixtures/SomeEmptyClass.php');
@@ -26,7 +26,7 @@ require_once(dirname(__FILE__) . '/../Fixtures/SomeEmptyClass.php');
  *
  * @package
  * @subpackage Tests
- * @version $Id: ObjectAccessorNodeTest.php 2340 2009-05-22 14:12:18Z sebastian $
+ * @version $Id: ObjectAccessorNodeTest.php 2588 2009-06-09 19:21:45Z sebastian $
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License, version 2
  */
 require_once(t3lib_extMgm::extPath('extbase', 'Tests/Base_testcase.php'));
@@ -50,7 +50,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ObjectAccessorNodeTest_testcase extends Tx
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_objectAccessorWorksWithStrings() {
+       public function objectAccessorWorksWithStrings() {
                $objectAccessorNode = new Tx_Fluid_Core_Parser_SyntaxTree_ObjectAccessorNode('exampleObject');
                $objectAccessorNode->setRenderingContext($this->renderingContext);
                
@@ -65,7 +65,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ObjectAccessorNodeTest_testcase extends Tx
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_objectAccessorWorksWithNestedObjects() {
+       public function objectAccessorWorksWithNestedObjects() {
                $exampleObject = new Tx_Fluid_Core_Parser_Fixtures_SomeEmptyClass('Foo');
 
                $objectAccessorNode = new Tx_Fluid_Core_Parser_SyntaxTree_ObjectAccessorNode('exampleObject.subproperty');
@@ -82,7 +82,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ObjectAccessorNodeTest_testcase extends Tx
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_objectAccessorWorksWithDirectProperties() {
+       public function objectAccessorWorksWithDirectProperties() {
                $expectedResult = 'This is a test';
                $exampleObject = new Tx_Fluid_Core_Parser_Fixtures_SomeEmptyClass('');
                $exampleObject->publicVariable = $expectedResult;
@@ -101,7 +101,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ObjectAccessorNodeTest_testcase extends Tx
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_objectAccessorWorksOnAssociativeArrays() {
+       public function objectAccessorWorksOnAssociativeArrays() {
                $expectedResult = 'My value';
                $exampleArray = array('key' => array('key2' => $expectedResult));
 
@@ -119,7 +119,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ObjectAccessorNodeTest_testcase extends Tx
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         * @expectedException Tx_Fluid_Core_RuntimeException
         */
-       public function test_objectAccessorThrowsExceptionIfKeyInAssociativeArrayDoesNotExist() {
+       public function objectAccessorThrowsExceptionIfKeyInAssociativeArrayDoesNotExist() {
                $this->markTestIncomplete('Objects accessors fail silently so far. We need some context dependencies here.');
                $expected = 'My value';
                $exampleArray = array('key' => array('key2' => $expected));
@@ -134,7 +134,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ObjectAccessorNodeTest_testcase extends Tx
         * @expectedException Tx_Fluid_Core_RuntimeException
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_objectAccessorThrowsErrorIfPropertyDoesNotExist() {
+       public function objectAccessorThrowsErrorIfPropertyDoesNotExist() {
                $this->markTestIncomplete('Objects accessors fail silently so far. We need some context dependencies here.');
 
                $expected = 'This is a test';
@@ -150,7 +150,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ObjectAccessorNodeTest_testcase extends Tx
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_objectAccessorPostProcessorIsCalled() {
+       public function objectAccessorPostProcessorIsCalled() {
                                $objectAccessorNode = new Tx_Fluid_Core_Parser_SyntaxTree_ObjectAccessorNode('variable');
                $objectAccessorNode->setRenderingContext($this->renderingContext);
 
index 2560610..e6645c4 100644 (file)
@@ -33,7 +33,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_TextNodeTest_testcase extends Tx_Extbase_B
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_renderReturnsSameStringAsGivenInConstructor() {
+       public function renderReturnsSameStringAsGivenInConstructor() {
                $string = 'I can work quite effectively in a train!';
                $node = new Tx_Fluid_Core_Parser_SyntaxTree_TextNode($string);
                $this->assertEquals($node->evaluate(), $string, 'The rendered string of a text node is not the same as the string given in the constructor.');
@@ -44,7 +44,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_TextNodeTest_testcase extends Tx_Extbase_B
         * @expectedException Tx_Fluid_Core_Parser_Exception
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_constructorThrowsExceptionIfNoStringGiven() {
+       public function constructorThrowsExceptionIfNoStringGiven() {
                new Tx_Fluid_Core_Parser_SyntaxTree_TextNode(123);
        }
 }
index 3b15e22..ce26df3 100644 (file)
@@ -96,6 +96,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeComparatorTest_testcase exte
                $this->renderingContext->setRenderingConfiguration($this->renderingConfiguration);
 
                $this->templateParser = t3lib_div::makeInstance('Tx_Fluid_Core_Parser_TemplateParser');
+               $this->templateParser->injectObjectFactory(new Tx_Fluid_Compatibility_ObjectFactory());
 
                $this->viewHelperNode = $this->getMock($this->buildAccessibleProxy('Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode'), array('dummy'), array(), '', FALSE);
                $this->viewHelperNode->setRenderingContext($this->renderingContext);
@@ -105,7 +106,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeComparatorTest_testcase exte
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_comparingEqualNumbersReturnsTrue() {
+       public function comparingEqualNumbersReturnsTrue() {
                $expression = '5==5';
                $expected = TRUE;
 
@@ -118,7 +119,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeComparatorTest_testcase exte
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_comparingEqualNumbersWithSpacesReturnsTrue() {
+       public function comparingEqualNumbersWithSpacesReturnsTrue() {
                $expression = '   5 ==5';
                $expected = TRUE;
 
@@ -131,7 +132,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeComparatorTest_testcase exte
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_comparingEqualObjectsNumbersWithSpacesReturnsTrue() {
+       public function comparingEqualObjectsNumbersWithSpacesReturnsTrue() {
                $expression = '{value1} =={value2}';
                $expected = TRUE;
                $this->templateVariableContainer->add('value1', 'Hello everybody');
@@ -146,7 +147,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeComparatorTest_testcase exte
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_comparingEqualNumberStoredInVariableWithNumberReturnsTrue() {
+       public function comparingEqualNumberStoredInVariableWithNumberReturnsTrue() {
                $expression = '{value1} ==42';
                $expected = TRUE;
                $this->templateVariableContainer->add('value1', '42');
@@ -160,7 +161,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeComparatorTest_testcase exte
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_oddNumberModulo2ReturnsTrue() {
+       public function oddNumberModulo2ReturnsTrue() {
                $expression = '43 % 2';
                $expected = TRUE;
 
@@ -173,7 +174,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeComparatorTest_testcase exte
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_evenNumberModulo2ReturnsFalse() {
+       public function evenNumberModulo2ReturnsFalse() {
                $expression = '42 % 2';
                $expected = FALSE;
 
@@ -186,7 +187,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeComparatorTest_testcase exte
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_greaterThanReturnsTrueIfNumberIsReallyGreater() {
+       public function greaterThanReturnsTrueIfNumberIsReallyGreater() {
                $expression = '10 > 9';
                $expected = TRUE;
 
@@ -199,7 +200,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeComparatorTest_testcase exte
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_greaterThanReturnsFalseIfNumberIsEqual() {
+       public function greaterThanReturnsFalseIfNumberIsEqual() {
                $expression = '10 > 10';
                $expected = FALSE;
 
@@ -212,7 +213,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeComparatorTest_testcase exte
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_greaterOrEqualsReturnsTrueIfNumberIsReallyGreater() {
+       public function greaterOrEqualsReturnsTrueIfNumberIsReallyGreater() {
                $expression = '10 >= 9';
                $expected = TRUE;
 
@@ -225,7 +226,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeComparatorTest_testcase exte
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_greaterOrEqualsReturnsTrueIfNumberIsEqual() {
+       public function greaterOrEqualsReturnsTrueIfNumberIsEqual() {
                $expression = '10 >= 10';
                $expected = TRUE;
 
@@ -238,7 +239,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeComparatorTest_testcase exte
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_greaterOrEqualsReturnFalseIfNumberIsSmaller() {
+       public function greaterOrEqualsReturnFalseIfNumberIsSmaller() {
                $expression = '10 >= 11';
                $expected = FALSE;
 
@@ -251,7 +252,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeComparatorTest_testcase exte
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_lessThanReturnsTrueIfNumberIsReallyless() {
+       public function lessThanReturnsTrueIfNumberIsReallyless() {
                $expression = '9 < 10';
                $expected = TRUE;
 
@@ -264,7 +265,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeComparatorTest_testcase exte
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_lessThanReturnsFalseIfNumberIsEqual() {
+       public function lessThanReturnsFalseIfNumberIsEqual() {
                $expression = '10 < 10';
                $expected = FALSE;
 
@@ -277,7 +278,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeComparatorTest_testcase exte
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_lessOrEqualsReturnsTrueIfNumberIsReallyLess() {
+       public function lessOrEqualsReturnsTrueIfNumberIsReallyLess() {
                $expression = '9 <= 10';
                $expected = TRUE;
 
@@ -290,7 +291,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeComparatorTest_testcase exte
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_lessOrEqualsReturnsTrueIfNumberIsEqual() {
+       public function lessOrEqualsReturnsTrueIfNumberIsEqual() {
                $expression = '10 <= 10';
                $expected = TRUE;
 
@@ -303,7 +304,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeComparatorTest_testcase exte
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_lessOrEqualsReturnFalseIfNumberIsBigger() {
+       public function lessOrEqualsReturnFalseIfNumberIsBigger() {
                $expression = '11 <= 10';
                $expected = FALSE;
 
@@ -317,7 +318,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeComparatorTest_testcase exte
         * @expectedException Tx_Fluid_Core_RuntimeException
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_havingMoreThanThreeElementsInTheSyntaxTreeThrowsException() {
+       public function havingMoreThanThreeElementsInTheSyntaxTreeThrowsException() {
                $expression = '   5 ==5 {blubb} {bla} {blu}';
                $expected = TRUE;
 
@@ -330,7 +331,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeComparatorTest_testcase exte
         * @expectedException Tx_Fluid_Core_RuntimeException
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_comparingStringsThrowsException() {
+       public function comparingStringsThrowsException() {
                $this->markTestIncomplete('Not sure what the intended behavior should be. See TODO inside ViewHelperNode.');
                $expression = '   blubb ==5 ';
                $expected = TRUE;
index 0fe9289..2b1f86f 100644 (file)
 /**
  * @package
  * @subpackage
- * @version $Id: ViewHelperNodeTest.php 2575 2009-06-06 06:45:41Z sebastian $
+ * @version $Id: ViewHelperNodeTest.php 2588 2009-06-09 19:21:45Z sebastian $
  */
 /**
  * Testcase for [insert classname here]
  *
  * @package
  * @subpackage Tests
- * @version $Id: ViewHelperNodeTest.php 2575 2009-06-06 06:45:41Z sebastian $
+ * @version $Id: ViewHelperNodeTest.php 2588 2009-06-09 19:21:45Z sebastian $
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License, version 2
  */
 include_once(dirname(__FILE__) . '/../Fixtures/ChildNodeAccessFacetViewHelper.php');
@@ -83,7 +83,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeTest_testcase extends Tx_Ext
         * @test
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_constructorSetsViewHelperClassNameAndArguments() {
+       public function constructorSetsViewHelperClassNameAndArguments() {
                $viewHelperClassName = 'MyViewHelperClassName';
                $arguments = array('foo' => 'bar');
                $viewHelperNode = $this->getMock($this->buildAccessibleProxy('Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode'), array('dummy'), array($viewHelperClassName, $arguments));
@@ -97,7 +97,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeTest_testcase extends Tx_Ext
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_childNodeAccessFacetWorksAsExpected() {
+       public function childNodeAccessFacetWorksAsExpected() {
                $childNode = $this->getMock('Tx_Fluid_Core_Parser_SyntaxTree_TextNode', array(), array('foo'));
 
                $mockViewHelper = $this->getMock('Tx_Fluid_Core_Parser_Fixtures_ChildNodeAccessFacetViewHelper', array('setChildNodes', 'initializeArguments', 'render', 'prepareArguments', 'setRenderingContext', 'isObjectAccessorPostProcessorEnabled'));
@@ -123,7 +123,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeTest_testcase extends Tx_Ext
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_validateArgumentsIsCalledByViewHelperNode() {
+       public function validateArgumentsIsCalledByViewHelperNode() {
                $mockViewHelper = $this->getMock('Tx_Fluid_Core_ViewHelper_AbstractViewHelper', array('render', 'validateArguments', 'prepareArguments'));
                $mockViewHelper->expects($this->once())->method('validateArguments');
 
@@ -143,7 +143,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeTest_testcase extends Tx_Ext
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_renderMethodIsCalledWithCorrectArguments() {
+       public function renderMethodIsCalledWithCorrectArguments() {
                $arguments = array(
                        'param0' => new Tx_Fluid_Core_ViewHelper_ArgumentDefinition('param1', 'string', 'Hallo', TRUE, null, FALSE),
                        'param1' => new Tx_Fluid_Core_ViewHelper_ArgumentDefinition('param1', 'string', 'Hallo', TRUE, null, TRUE),
@@ -172,7 +172,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeTest_testcase extends Tx_Ext
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_evaluateMethodPassesControllerContextToViewHelper() {
+       public function evaluateMethodPassesControllerContextToViewHelper() {
                $mockViewHelper = $this->getMock('Tx_Fluid_Core_ViewHelper_AbstractViewHelper', array('render', 'validateArguments', 'prepareArguments', 'setControllerContext'));
                $mockViewHelper->expects($this->once())->method('setControllerContext')->with($this->controllerContext);
 
@@ -190,7 +190,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeTest_testcase extends Tx_Ext
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_evaluateMethodPassesViewHelperVariableContainerToViewHelper() {
+       public function evaluateMethodPassesViewHelperVariableContainerToViewHelper() {
                $mockViewHelper = $this->getMock('Tx_Fluid_Core_ViewHelper_AbstractViewHelper', array('render', 'validateArguments', 'prepareArguments', 'setViewHelperVariableContainer'));
                $mockViewHelper->expects($this->once())->method('setViewHelperVariableContainer')->with($this->viewHelperVariableContainer);
 
@@ -208,7 +208,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeTest_testcase extends Tx_Ext
         * @test
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_convertArgumentValueCallsConvertToBooleanForArgumentsOfTypeBoolean() {
+       public function convertArgumentValueCallsConvertToBooleanForArgumentsOfTypeBoolean() {
                $viewHelperNode = $this->getMock($this->buildAccessibleProxy('Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode'), array('convertToBoolean'), array(), '', FALSE);
                $viewHelperNode->_set('renderingContext', $this->renderingContext);
                $argumentViewHelperNode = $this->getMock('Tx_Fluid_Core_Parser_SyntaxTree_AbstractNode', array('evaluate'), array(), '', FALSE);
@@ -224,7 +224,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeTest_testcase extends Tx_Ext
         * @test
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_convertToBooleanProperlyConvertsValuesOfTypeBoolean() {
+       public function convertToBooleanProperlyConvertsValuesOfTypeBoolean() {
                $viewHelperNode = $this->getMock($this->buildAccessibleProxy('Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode'), array('dummy'), array(), '', FALSE);
 
                $this->assertFalse($viewHelperNode->_call('convertToBoolean', FALSE));
@@ -235,7 +235,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeTest_testcase extends Tx_Ext
         * @test
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_convertToBooleanProperlyConvertsValuesOfTypeString() {
+       public function convertToBooleanProperlyConvertsValuesOfTypeString() {
                $viewHelperNode = $this->getMock($this->buildAccessibleProxy('Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode'), array('dummy'), array(), '', FALSE);
 
                $this->assertFalse($viewHelperNode->_call('convertToBoolean', ''));
@@ -250,7 +250,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeTest_testcase extends Tx_Ext
         * @test
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_convertToBooleanProperlyConvertsNumericValues() {
+       public function convertToBooleanProperlyConvertsNumericValues() {
                $viewHelperNode = $this->getMock($this->buildAccessibleProxy('Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode'), array('dummy'), array(), '', FALSE);
 
                $this->assertFalse($viewHelperNode->_call('convertToBoolean', 0));
@@ -265,7 +265,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeTest_testcase extends Tx_Ext
         * @test
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_convertToBooleanProperlyConvertsValuesOfTypeArray() {
+       public function convertToBooleanProperlyConvertsValuesOfTypeArray() {
                $viewHelperNode = $this->getMock($this->buildAccessibleProxy('Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode'), array('dummy'), array(), '', FALSE);
 
                $this->assertFalse($viewHelperNode->_call('convertToBoolean', array()));
@@ -278,7 +278,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeTest_testcase extends Tx_Ext
         * @test
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_convertToBooleanProperlyConvertsObjects() {
+       public function convertToBooleanProperlyConvertsObjects() {
                $viewHelperNode = $this->getMock($this->buildAccessibleProxy('Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode'), array('dummy'), array(), '', FALSE);
 
                $this->assertFalse($viewHelperNode->_call('convertToBoolean', NULL));
index e80ba9e..9c1074c 100644 (file)
@@ -33,7 +33,7 @@ class Tx_Fluid_Core_Parser_TemplateParserPatternTest_testcase extends Tx_Extbase
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_testSCAN_PATTERN_NAMESPACEDECLARATION() {
+       public function testSCAN_PATTERN_NAMESPACEDECLARATION() {
                $pattern = str_replace('FLUID_NAMESPACE_SEPARATOR', preg_quote(Tx_Fluid_Fluid::NAMESPACE_SEPARATOR), Tx_Fluid_Core_Parser_TemplateParser::$SCAN_PATTERN_NAMESPACEDECLARATION);
                $this->assertEquals(preg_match($pattern, '{namespace f3=Tx_Fluid_blubb}'), 1, 'The SCAN_PATTERN_NAMESPACEDECLARATION pattern did not match a namespace declaration (1).');
                $this->assertEquals(preg_match($pattern, '{namespace f3=Tx_Fluid_Blubb }'), 1, 'The SCAN_PATTERN_NAMESPACEDECLARATION pattern did not match a namespace declaration (2).');
@@ -46,7 +46,7 @@ class Tx_Fluid_Core_Parser_TemplateParserPatternTest_testcase extends Tx_Extbase
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_testSPLIT_PATTERN_DYNAMICTAGS() {
+       public function testSPLIT_PATTERN_DYNAMICTAGS() {
                $pattern = $this->insertNamespaceIntoRegularExpression(Tx_Fluid_Core_Parser_TemplateParser::$SPLIT_PATTERN_TEMPLATE_DYNAMICTAGS, array('f3', 't3'));
 
                $source = '<html><head> <f3:a.testing /> <f3:blablubb> {testing}</f4:blz> </t3:hi.jo>';
@@ -79,7 +79,7 @@ class Tx_Fluid_Core_Parser_TemplateParserPatternTest_testcase extends Tx_Extbase
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_testSCAN_PATTERN_DYNAMICTAG() {
+       public function testSCAN_PATTERN_DYNAMICTAG() {
                $pattern = $this->insertNamespaceIntoRegularExpression(Tx_Fluid_Core_Parser_TemplateParser::$SCAN_PATTERN_TEMPLATE_VIEWHELPERTAG, array('f3'));
                $source = '<f3:crop attribute="Hallo">';
                $expected = array (
@@ -146,7 +146,7 @@ class Tx_Fluid_Core_Parser_TemplateParserPatternTest_testcase extends Tx_Extbase
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_testSCAN_PATTERN_CLOSINGDYNAMICTAG() {
+       public function testSCAN_PATTERN_CLOSINGDYNAMICTAG() {
                $pattern = $this->insertNamespaceIntoRegularExpression(Tx_Fluid_Core_Parser_TemplateParser::$SCAN_PATTERN_TEMPLATE_CLOSINGVIEWHELPERTAG, array('f3'));
                $this->assertEquals(preg_match($pattern, '</f3:bla>'), 1, 'The SCAN_PATTERN_CLOSINGDYNAMICTAG does not match a tag it should match.');
                $this->assertEquals(preg_match($pattern, '</f3:bla.a    >'), 1, 'The SCAN_PATTERN_CLOSINGDYNAMICTAG does not match a tag (with spaces included) it should match.');
@@ -157,7 +157,7 @@ class Tx_Fluid_Core_Parser_TemplateParserPatternTest_testcase extends Tx_Extbase
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_testSPLIT_PATTERN_TAGARGUMENTS() {
+       public function testSPLIT_PATTERN_TAGARGUMENTS() {
                $pattern = Tx_Fluid_Core_Parser_TemplateParser::$SPLIT_PATTERN_TAGARGUMENTS;
                $source = ' test="Hallo" argument:post="\'Web" other=\'Single"Quoted\'';
                $this->assertEquals(preg_match_all($pattern, $source, $matches, PREG_SET_ORDER), 3, 'The SPLIT_PATTERN_TAGARGUMENTS does not match correctly.');
@@ -167,7 +167,7 @@ class Tx_Fluid_Core_Parser_TemplateParserPatternTest_testcase extends Tx_Extbase
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_testSPLIT_PATTERN_SHORTHANDSYNTAX() {
+       public function testSPLIT_PATTERN_SHORTHANDSYNTAX() {
                $pattern = $this->insertNamespaceIntoRegularExpression(Tx_Fluid_Core_Parser_TemplateParser::$SPLIT_PATTERN_SHORTHANDSYNTAX, array('f3'));
 
                $source = 'some string{Object.bla}here as well';
@@ -204,7 +204,7 @@ class Tx_Fluid_Core_Parser_TemplateParserPatternTest_testcase extends Tx_Extbase
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_testSCAN_PATTERN_SHORTHANDSYNTAX_VIEWHELPER() {
+       public function testSCAN_PATTERN_SHORTHANDSYNTAX_VIEWHELPER() {
                $pattern = $this->insertNamespaceIntoRegularExpression(Tx_Fluid_Core_Parser_TemplateParser::$SCAN_PATTERN_SHORTHANDSYNTAX_VIEWHELPER, array('f'));
 
                $this->assertEquals(preg_match($pattern, '{flow3}'), 0, 'Shorthand ViewHelper was identified, but should not.');
@@ -222,7 +222,7 @@ class Tx_Fluid_Core_Parser_TemplateParserPatternTest_testcase extends Tx_Extbase
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_testSCAN_PATTERN_SHORTHANDSYNTAX_OBJECTACCESSORS() {
+       public function testSCAN_PATTERN_SHORTHANDSYNTAX_OBJECTACCESSORS() {
                $pattern = Tx_Fluid_Core_Parser_TemplateParser::$SCAN_PATTERN_SHORTHANDSYNTAX_OBJECTACCESSORS;
                $this->assertEquals(preg_match($pattern, '{object}'), 1, 'Object accessor not identified!');
                $this->assertEquals(preg_match($pattern, '{oBject1}'), 1, 'Object accessor not identified if there is a number and capitals inside!');
@@ -236,7 +236,7 @@ class Tx_Fluid_Core_Parser_TemplateParserPatternTest_testcase extends Tx_Extbase
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_testSCAN_PATTERN_SHORTHANDSYNTAX_ARRAYS() {
+       public function testSCAN_PATTERN_SHORTHANDSYNTAX_ARRAYS() {
                $pattern = Tx_Fluid_Core_Parser_TemplateParser::$SCAN_PATTERN_SHORTHANDSYNTAX_ARRAYS;
                $this->assertEquals(preg_match($pattern, '{a:b}'), 1, 'Array syntax not identified!');
                $this->assertEquals(preg_match($pattern, '{a:b, c :   d}'), 1, 'Array syntax not identified in case there are multiple properties!');
@@ -257,7 +257,7 @@ class Tx_Fluid_Core_Parser_TemplateParserPatternTest_testcase extends Tx_Extbase
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_testSPLIT_PATTERN_SHORTHANDSYNTAX_ARRAY_PARTS() {
+       public function testSPLIT_PATTERN_SHORTHANDSYNTAX_ARRAY_PARTS() {
                $pattern = Tx_Fluid_Core_Parser_TemplateParser::$SPLIT_PATTERN_SHORTHANDSYNTAX_ARRAY_PARTS;
 
                $source = '{a: b, e: {c:d, e:f}}';
@@ -304,7 +304,7 @@ class Tx_Fluid_Core_Parser_TemplateParserPatternTest_testcase extends Tx_Extbase
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_testSCAN_PATTERN_CDATA() {
+       public function testSCAN_PATTERN_CDATA() {
                $pattern = Tx_Fluid_Core_Parser_TemplateParser::$SCAN_PATTERN_CDATA;
                $this->assertEquals(preg_match($pattern, '<!-- Test -->'), 0, 'The SCAN_PATTERN_CDATA matches a comment, but it should not.');
                $this->assertEquals(preg_match($pattern, '<![CDATA[This is some ]]>'), 1, 'The SCAN_PATTERN_CDATA does not match a simple CDATA string.');
index bbf62d2..5504eb5 100644 (file)
@@ -46,7 +46,7 @@ class Tx_Fluid_Core_ParsingStateTest_testcase extends Tx_Extbase_Base_testcase {
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_setRootNodeCanBeReadOutAgain() {
+       public function setRootNodeCanBeReadOutAgain() {
                $rootNode = new Tx_Fluid_Core_Parser_SyntaxTree_RootNode();
                $this->parsingState->setRootNode($rootNode);
                $this->assertSame($this->parsingState->getRootNode(), $rootNode, 'Root node could not be read out again.');
@@ -56,7 +56,7 @@ class Tx_Fluid_Core_ParsingStateTest_testcase extends Tx_Extbase_Base_testcase {
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_pushAndGetFromStackWorks() {
+       public function pushAndGetFromStackWorks() {
                $rootNode = new Tx_Fluid_Core_Parser_SyntaxTree_RootNode();
                $this->parsingState->pushNodeToStack($rootNode);
                $this->assertSame($rootNode, $this->parsingState->getNodeFromStack($rootNode), 'Node returned from stack was not the right one.');
@@ -67,7 +67,7 @@ class Tx_Fluid_Core_ParsingStateTest_testcase extends Tx_Extbase_Base_testcase {
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_renderCallsTheRightMethodsOnTheRootNode() {
+       public function renderCallsTheRightMethodsOnTheRootNode() {
                $renderingContext = $this->getMock('Tx_Fluid_Core_Rendering_RenderingContext');
 
                $rootNode = $this->getMock('Tx_Fluid_Core_Parser_SyntaxTree_RootNode');
index 5487d68..0d169b3 100644 (file)
 /**
  * @package Fluid
  * @subpackage Tests
- * @version $Id: HTMLSpecialCharsPostProcessorTest.php 2523 2009-06-02 10:35:40Z k-fish $
+ * @version $Id: HTMLSpecialCharsPostProcessorTest.php 2588 2009-06-09 19:21:45Z sebastian $
  */
 /**
  * Testcase for HTMLSPecialChartPostProcessor
  *
  * @package Fluid
  * @subpackage Tests
- * @version $Id: HTMLSpecialCharsPostProcessorTest.php 2523 2009-06-02 10:35:40Z k-fish $
+ * @version $Id: HTMLSpecialCharsPostProcessorTest.php 2588 2009-06-09 19:21:45Z sebastian $
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License, version 2
  */
 require_once(t3lib_extMgm::extPath('extbase', 'Tests/Base_testcase.php'));
@@ -43,7 +43,7 @@ class Tx_Fluid_Core_Rendering_HTMLSpecialCharsPostProcessorTest_testcase extends
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_postProcessorReturnsObjectsIfInArgumentsMode() {
+       public function postProcessorReturnsObjectsIfInArgumentsMode() {
                $string = 'Expected <p>';
                $this->assertEquals($string, $this->htmlSpecialCharsPostProcessor->process($string, FALSE));
        }
@@ -52,7 +52,7 @@ class Tx_Fluid_Core_Rendering_HTMLSpecialCharsPostProcessorTest_testcase extends
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_postProcessorReturnsChangedObjectsIfInArgumentsMode() {
+       public function postProcessorReturnsChangedObjectsIfInArgumentsMode() {
                $string = 'Expected <p>';
                $expected = 'Expected &lt;p&gt;';
                $this->assertEquals($expected, $this->htmlSpecialCharsPostProcessor->process($string, TRUE));
index 207000b..7267c1d 100644 (file)
@@ -43,7 +43,7 @@ class Tx_Fluid_Core_Rendering_RenderingConfigurationTest_testcase extends Tx_Ext
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_objectAccessorPostProcessorCanBeReadOutAgain() {
+       public function objectAccessorPostProcessorCanBeReadOutAgain() {
                $objectAccessorPostProcessor = $this->getMock('Tx_Fluid_Core_Rendering_ObjectAccessorPostProcessorInterface');
                $this->renderingConfiguration->setObjectAccessorPostProcessor($objectAccessorPostProcessor);
                $this->assertSame($objectAccessorPostProcessor, $this->renderingConfiguration->getObjectAccessorPostProcessor());
index c2456af..7bc0235 100644 (file)
 /**
  * @package Fluid
  * @subpackage Tests
- * @version $Id: RenderingContextTest.php 2523 2009-06-02 10:35:40Z k-fish $
+ * @version $Id: RenderingContextTest.php 2588 2009-06-09 19:21:45Z sebastian $
  */
 /**
  * Testcase for ParsingState
  *
  * @package Fluid
  * @subpackage Tests
- * @version $Id: RenderingContextTest.php 2523 2009-06-02 10:35:40Z k-fish $
+ * @version $Id: RenderingContextTest.php 2588 2009-06-09 19:21:45Z sebastian $
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License, version 2
  */
 require_once(t3lib_extMgm::extPath('extbase', 'Tests/Base_testcase.php'));
@@ -43,7 +43,7 @@ class Tx_Fluid_Core_Rendering_RenderingContextTest_testcase extends Tx_Extbase_B
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_templateVariableContainerCanBeReadCorrectly() {
+       public function templateVariableContainerCanBeReadCorrectly() {
                $templateVariableContainer = $this->getMock('Tx_Fluid_Core_ViewHelper_TemplateVariableContainer');
                $this->renderingContext->setTemplateVariableContainer($templateVariableContainer);
                $this->assertSame($this->renderingContext->getTemplateVariableContainer(), $templateVariableContainer, 'Template Variable Container could not be read out again.');
@@ -53,7 +53,7 @@ class Tx_Fluid_Core_Rendering_RenderingContextTest_testcase extends Tx_Extbase_B
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_controllerContextCanBeReadCorrectly() {
+       public function controllerContextCanBeReadCorrectly() {
                $controllerContext = $this->getMock('Tx_Extbase_MVC_Controller_ControllerContext');
                $this->renderingContext->setControllerContext($controllerContext);
                $this->assertSame($this->renderingContext->getControllerContext(), $controllerContext);
@@ -63,7 +63,7 @@ class Tx_Fluid_Core_Rendering_RenderingContextTest_testcase extends Tx_Extbase_B
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_renderingConfiguationCanBeReadCorrectly() {
+       public function renderingConfiguationCanBeReadCorrectly() {
                $renderingConfiguration = $this->getMock('Tx_Fluid_Core_Rendering_RenderingConfiguration');
                $this->renderingContext->setRenderingConfiguration($renderingConfiguration);
                $this->assertSame($this->renderingContext->getRenderingConfiguration(), $renderingConfiguration);
@@ -73,7 +73,7 @@ class Tx_Fluid_Core_Rendering_RenderingContextTest_testcase extends Tx_Extbase_B
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_ObjectAccessorPostProcessorEnabledCanBeReadCorrectly() {
+       public function ObjectAccessorPostProcessorEnabledCanBeReadCorrectly() {
                $this->assertTrue($this->renderingContext->isObjectAccessorPostProcessorEnabled(), 'The default argument evaluation was not FALSE');
                $this->renderingContext->setObjectAccessorPostProcessorEnabled(FALSE);
                $this->assertFalse($this->renderingContext->isObjectAccessorPostProcessorEnabled());
@@ -83,7 +83,7 @@ class Tx_Fluid_Core_Rendering_RenderingContextTest_testcase extends Tx_Extbase_B
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_viewHelperVariableContainerCanBeReadCorrectly() {
+       public function viewHelperVariableContainerCanBeReadCorrectly() {
                $viewHelperVariableContainer = $this->getMock('Tx_Fluid_Core_ViewHelper_ViewHelperVariableContainer');
                $this->renderingContext->setViewHelperVariableContainer($viewHelperVariableContainer);
                $this->assertSame($viewHelperVariableContainer, $this->renderingContext->getViewHelperVariableContainer());
index b47d675..dcf1e5a 100644 (file)
@@ -40,7 +40,7 @@ class Tx_Fluid_Core_TagBasedViewHelperTest_testcase extends Tx_Extbase_Base_test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_oneTagAttributeIsRenderedCorrectly() {
+       public function oneTagAttributeIsRenderedCorrectly() {
                $tagBuilderMock = $this->getMock('Tx_Fluid_Core_ViewHelper_TagBuilder', array('addAttribute'), array(), '', FALSE);
                $tagBuilderMock->expects($this->once())->method('addAttribute')->with('foo', 'bar');
                $this->viewHelper->injectTagBuilder($tagBuilderMock);
@@ -56,7 +56,7 @@ class Tx_Fluid_Core_TagBasedViewHelperTest_testcase extends Tx_Extbase_Base_test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_additionalTagAttributesAreRenderedCorrectly() {
+       public function additionalTagAttributesAreRenderedCorrectly() {
                $tagBuilderMock = $this->getMock('Tx_Fluid_Core_ViewHelper_TagBuilder', array('addAttribute'), array(), '', FALSE);
                $tagBuilderMock->expects($this->once())->method('addAttribute')->with('foo', 'bar');
                $this->viewHelper->injectTagBuilder($tagBuilderMock);
@@ -71,7 +71,7 @@ class Tx_Fluid_Core_TagBasedViewHelperTest_testcase extends Tx_Extbase_Base_test
         * @test
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_standardTagAttributesAreRegistered() {
+       public function standardTagAttributesAreRegistered() {
                $tagBuilderMock = $this->getMock('Tx_Fluid_Core_ViewHelper_TagBuilder', array('addAttribute'), array(), '', FALSE);
                $tagBuilderMock->expects($this->at(0))->method('addAttribute')->with('class', 'classAttribute');
                $tagBuilderMock->expects($this->at(1))->method('addAttribute')->with('dir', 'dirAttribute');
index cbd88a4..a8aa98d 100644 (file)
@@ -34,7 +34,7 @@ class Tx_Fluid_Core_TagBuilderTest_testcase extends Tx_Extbase_Base_testcase {
         * @test
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_constructorSetsTagName() {
+       public function constructorSetsTagName() {
                $tagBuilder = new Tx_Fluid_Core_ViewHelper_TagBuilder('someTagName');
                $this->assertEquals('someTagName', $tagBuilder->getTagName());
        }
@@ -43,7 +43,7 @@ class Tx_Fluid_Core_TagBuilderTest_testcase extends Tx_Extbase_Base_testcase {
         * @test
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_constructorSetsTagContent() {
+       public function constructorSetsTagContent() {
                $tagBuilder = new Tx_Fluid_Core_ViewHelper_TagBuilder('', '<some text>');
                $this->assertEquals('<some text>', $tagBuilder->getContent());
        }
@@ -52,7 +52,7 @@ class Tx_Fluid_Core_TagBuilderTest_testcase extends Tx_Extbase_Base_testcase {
         * @test
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_setContentDoesNotEscapeValue() {
+       public function setContentDoesNotEscapeValue() {
                $tagBuilder = new Tx_Fluid_Core_ViewHelper_TagBuilder();
                $tagBuilder->setContent('<to be escaped>', FALSE);
                $this->assertEquals('<to be escaped>', $tagBuilder->getContent());
@@ -62,7 +62,7 @@ class Tx_Fluid_Core_TagBuilderTest_testcase extends Tx_Extbase_Base_testcase {
         * @test
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_hasContentReturnsTrueIfTagContainsText() {
+       public function hasContentReturnsTrueIfTagContainsText() {
                $tagBuilder = new Tx_Fluid_Core_ViewHelper_TagBuilder('', 'foo');
                $this->assertTrue($tagBuilder->hasContent());
        }
@@ -71,7 +71,7 @@ class Tx_Fluid_Core_TagBuilderTest_testcase extends Tx_Extbase_Base_testcase {
         * @test
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_hasContentReturnsFalseIfContentIsNull() {
+       public function hasContentReturnsFalseIfContentIsNull() {
                $tagBuilder = new Tx_Fluid_Core_ViewHelper_TagBuilder();
                $tagBuilder->setContent(NULL);
                $this->assertFalse($tagBuilder->hasContent());
@@ -81,7 +81,7 @@ class Tx_Fluid_Core_TagBuilderTest_testcase extends Tx_Extbase_Base_testcase {
         * @test
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_hasContentReturnsFalseIfContentIsAnEmptyString() {
+       public function hasContentReturnsFalseIfContentIsAnEmptyString() {
                $tagBuilder = new Tx_Fluid_Core_ViewHelper_TagBuilder();
                $tagBuilder->setContent('');
                $this->assertFalse($tagBuilder->hasContent());
@@ -91,7 +91,7 @@ class Tx_Fluid_Core_TagBuilderTest_testcase extends Tx_Extbase_Base_testcase {
         * @test
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_renderReturnsEmptyStringByDefault() {
+       public function renderReturnsEmptyStringByDefault() {
                $tagBuilder = new Tx_Fluid_Core_ViewHelper_TagBuilder();
                $this->assertEquals('', $tagBuilder->render());
        }
@@ -100,7 +100,7 @@ class Tx_Fluid_Core_TagBuilderTest_testcase extends Tx_Extbase_Base_testcase {
         * @test
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_renderReturnsSelfClosingTagIfNoContentIsSpecified() {
+       public function renderReturnsSelfClosingTagIfNoContentIsSpecified() {
                $tagBuilder = new Tx_Fluid_Core_ViewHelper_TagBuilder('tag');
                $this->assertEquals('<tag />', $tagBuilder->render());
        }
@@ -109,7 +109,7 @@ class Tx_Fluid_Core_TagBuilderTest_testcase extends Tx_Extbase_Base_testcase {
         * @test
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_renderReturnsOpeningAndClosingTagIfNoContentIsSpecifiedButForceClosingTagIsTrue() {
+       public function renderReturnsOpeningAndClosingTagIfNoContentIsSpecifiedButForceClosingTagIsTrue() {
                $tagBuilder = new Tx_Fluid_Core_ViewHelper_TagBuilder('tag');
                $tagBuilder->forceClosingTag(TRUE);
                $this->assertEquals('<tag></tag>', $tagBuilder->render());
@@ -119,7 +119,7 @@ class Tx_Fluid_Core_TagBuilderTest_testcase extends Tx_Extbase_Base_testcase {
         * @test
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_attributesAreProperlyRendered() {
+       public function attributesAreProperlyRendered() {
                $tagBuilder = new Tx_Fluid_Core_ViewHelper_TagBuilder('tag');
                $tagBuilder->addAttribute('attribute1', 'attribute1value');
                $tagBuilder->addAttribute('attribute2', 'attribute2value');
@@ -131,7 +131,7 @@ class Tx_Fluid_Core_TagBuilderTest_testcase extends Tx_Extbase_Base_testcase {
         * @test
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_attributeValuesAreEscapedByDefault() {
+       public function attributeValuesAreEscapedByDefault() {
                $tagBuilder = new Tx_Fluid_Core_ViewHelper_TagBuilder('tag');
                $tagBuilder->addAttribute('foo', '<to be escaped>');
                $this->assertEquals('<tag foo="&lt;to be escaped&gt;" />', $tagBuilder->render());
@@ -141,7 +141,7 @@ class Tx_Fluid_Core_TagBuilderTest_testcase extends Tx_Extbase_Base_testcase {
         * @test
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_attributeValuesAreNotEscapedIfDisabled() {
+       public function attributeValuesAreNotEscapedIfDisabled() {
                $tagBuilder = new Tx_Fluid_Core_ViewHelper_TagBuilder('tag');
                $tagBuilder->addAttribute('foo', '<not to be escaped>', FALSE);
                $this->assertEquals('<tag foo="<not to be escaped>" />', $tagBuilder->render());
@@ -151,7 +151,7 @@ class Tx_Fluid_Core_TagBuilderTest_testcase extends Tx_Extbase_Base_testcase {
         * @test
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_attributesCanBeRemoved() {
+       public function attributesCanBeRemoved() {
                $tagBuilder = new Tx_Fluid_Core_ViewHelper_TagBuilder('tag');
                $tagBuilder->addAttribute('attribute1', 'attribute1value');
                $tagBuilder->addAttribute('attribute2', 'attribute2value');
@@ -164,7 +164,7 @@ class Tx_Fluid_Core_TagBuilderTest_testcase extends Tx_Extbase_Base_testcase {
         * @test
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_tagNameCanBeOverridden() {
+       public function tagNameCanBeOverridden() {
                $tagBuilder = new Tx_Fluid_Core_ViewHelper_TagBuilder('foo');
                $tagBuilder->setTagName('bar');
                $this->assertEquals('<bar />', $tagBuilder->render());
@@ -174,7 +174,7 @@ class Tx_Fluid_Core_TagBuilderTest_testcase extends Tx_Extbase_Base_testcase {
         * @test
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_tagContentCanBeOverridden() {
+       public function tagContentCanBeOverridden() {
                $tagBuilder = new Tx_Fluid_Core_ViewHelper_TagBuilder('foo', 'some content');
                $tagBuilder->setContent('');
                $this->assertEquals('<foo />', $tagBuilder->render());
@@ -184,7 +184,7 @@ class Tx_Fluid_Core_TagBuilderTest_testcase extends Tx_Extbase_Base_testcase {
         * @test
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_tagIsNotRenderedIfTagNameIsEmpty() {
+       public function tagIsNotRenderedIfTagNameIsEmpty() {
                $tagBuilder = new Tx_Fluid_Core_ViewHelper_TagBuilder('foo');
                $tagBuilder->setTagName('');
                $this->assertEquals('', $tagBuilder->render());
index 3e826f1..3494e6c 100644 (file)
@@ -60,7 +60,7 @@ class Tx_Fluid_Core_TemplateParserTest_testcase extends Tx_Extbase_Base_testcase
         * @author Sebastian Kurfürst <sebastian@typo3.or>
         * @expectedException Tx_Fluid_Core_Parser_Exception
         */
-       public function test_parseThrowsExceptionWhenStringArgumentMissing() {
+       public function parseThrowsExceptionWhenStringArgumentMissing() {
                $this->templateParser->parse(123);
        }
 
@@ -68,7 +68,7 @@ class Tx_Fluid_Core_TemplateParserTest_testcase extends Tx_Extbase_Base_testcase
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_parseExtractsNamespacesCorrectly() {
+       public function parseExtractsNamespacesCorrectly() {
                $this->templateParser->parse(" \{namespace f4=F7\Rocks} {namespace f4=Tx_Fluid_Really}");
                $expected = array(
                        'f' => 'Tx_Fluid_ViewHelpers',
@@ -82,7 +82,7 @@ class Tx_Fluid_Core_TemplateParserTest_testcase extends Tx_Extbase_Base_testcase
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         * @expectedException Tx_Fluid_Core_Parser_Exception
         */
-       public function test_parseThrowsExceptionIfNamespaceIsRedeclared() {
+       public function parseThrowsExceptionIfNamespaceIsRedeclared() {
                $this->templateParser->parse("{namespace f3=Tx_Fluid_Blablubb} {namespace f3= Tx_Fluid_Blu}");
        }
 
@@ -90,7 +90,7 @@ class Tx_Fluid_Core_TemplateParserTest_testcase extends Tx_Extbase_Base_testcase
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_fixture01ReturnsCorrectObjectTree($file = '/Fixtures/TemplateParserTestFixture01.html') {
+       public function fixture01ReturnsCorrectObjectTree($file = '/Fixtures/TemplateParserTestFixture01.html') {
                $templateSource = file_get_contents(dirname(__FILE__) . $file, FILE_TEXT);
 
                $rootNode = new Tx_Fluid_Core_Parser_SyntaxTree_RootNode();
@@ -108,15 +108,15 @@ class Tx_Fluid_Core_TemplateParserTest_testcase extends Tx_Extbase_Base_testcase
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_fixture01ShorthandSyntaxReturnsCorrectObjectTree() {
-               $this->test_fixture01ReturnsCorrectObjectTree('/Fixtures/TemplateParserTestFixture01-shorthand.html');
+       public function fixture01ShorthandSyntaxReturnsCorrectObjectTree() {
+               $this->fixture01ReturnsCorrectObjectTree('/Fixtures/TemplateParserTestFixture01-shorthand.html');
        }
 
        /**
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_fixture02ReturnsCorrectObjectTree($file = '/Fixtures/TemplateParserTestFixture02.html') {
+       public function fixture02ReturnsCorrectObjectTree($file = '/Fixtures/TemplateParserTestFixture02.html') {
                $templateSource = file_get_contents(dirname(__FILE__) . $file, FILE_TEXT);
 
                $rootNode = new Tx_Fluid_Core_Parser_SyntaxTree_RootNode();
@@ -138,8 +138,8 @@ class Tx_Fluid_Core_TemplateParserTest_testcase extends Tx_Extbase_Base_testcase
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_fixture02ShorthandSyntaxReturnsCorrectObjectTree() {
-               $this->test_fixture02ReturnsCorrectObjectTree('/Fixtures/TemplateParserTestFixture02-shorthand.html');
+       public function fixture02ShorthandSyntaxReturnsCorrectObjectTree() {
+               $this->fixture02ReturnsCorrectObjectTree('/Fixtures/TemplateParserTestFixture02-shorthand.html');
        }
 
        /**
@@ -147,7 +147,7 @@ class Tx_Fluid_Core_TemplateParserTest_testcase extends Tx_Extbase_Base_testcase
         * @expectedException Tx_Fluid_Core_Parser_Exception
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_fixture03ThrowsExceptionBecauseWrongTagNesting() {
+       public function fixture03ThrowsExceptionBecauseWrongTagNesting() {
                $templateSource = file_get_contents(dirname(__FILE__) . '/Fixtures/TemplateParserTestFixture03.html', FILE_TEXT);
                $this->templateParser->parse($templateSource);
        }
@@ -157,7 +157,7 @@ class Tx_Fluid_Core_TemplateParserTest_testcase extends Tx_Extbase_Base_testcase
         * @expectedException Tx_Fluid_Core_Parser_Exception
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_fixture04ThrowsExceptionBecauseClosingATagWhichWasNeverOpened() {
+       public function fixture04ThrowsExceptionBecauseClosingATagWhichWasNeverOpened() {
                $templateSource = file_get_contents(dirname(__FILE__) . '/Fixtures/TemplateParserTestFixture04.html', FILE_TEXT);
                $this->templateParser->parse($templateSource);
        }
@@ -166,7 +166,7 @@ class Tx_Fluid_Core_TemplateParserTest_testcase extends Tx_Extbase_Base_testcase
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_fixture05ReturnsCorrectObjectTree() {
+       public function fixture05ReturnsCorrectObjectTree() {
                $templateSource = file_get_contents(dirname(__FILE__) . '/Fixtures/TemplateParserTestFixture05.html', FILE_TEXT);
 
                $rootNode = new Tx_Fluid_Core_Parser_SyntaxTree_RootNode();
@@ -184,7 +184,7 @@ class Tx_Fluid_Core_TemplateParserTest_testcase extends Tx_Extbase_Base_testcase
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_fixture06ReturnsCorrectObjectTree($file = '/Fixtures/TemplateParserTestFixture06.html') {
+       public function fixture06ReturnsCorrectObjectTree($file = '/Fixtures/TemplateParserTestFixture06.html') {
                $templateSource = file_get_contents(dirname(__FILE__) . $file, FILE_TEXT);
 
                $rootNode = new Tx_Fluid_Core_Parser_SyntaxTree_RootNode();
@@ -207,15 +207,15 @@ class Tx_Fluid_Core_TemplateParserTest_testcase extends Tx_Extbase_Base_testcase
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_fixture06ShorthandSyntaxReturnsCorrectObjectTree() {
-               $this->test_fixture06ReturnsCorrectObjectTree('/Fixtures/TemplateParserTestFixture06-shorthand.html');
+       public function fixture06ShorthandSyntaxReturnsCorrectObjectTree() {
+               $this->fixture06ReturnsCorrectObjectTree('/Fixtures/TemplateParserTestFixture06-shorthand.html');
        }
 
        /**
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_fixture07ReturnsCorrectlyRenderedResult() {
+       public function fixture07ReturnsCorrectlyRenderedResult() {
                $templateSource = file_get_contents(dirname(__FILE__) . '/Fixtures/TemplateParserTestFixture07.html', FILE_TEXT);
 
                $templateVariableContainer = new Tx_Fluid_Core_ViewHelper_TemplateVariableContainer(array('id' => 1));
@@ -232,7 +232,7 @@ class Tx_Fluid_Core_TemplateParserTest_testcase extends Tx_Extbase_Base_testcase
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_fixture08ReturnsCorrectlyRenderedResult() {
+       public function fixture08ReturnsCorrectlyRenderedResult() {
                $templateSource = file_get_contents(dirname(__FILE__) . '/Fixtures/TemplateParserTestFixture08.html', FILE_TEXT);
 
                $variableContainer = new Tx_Fluid_Core_ViewHelper_TemplateVariableContainer(array('idList' => array(0, 1, 2, 3, 4, 5)));
@@ -249,7 +249,7 @@ class Tx_Fluid_Core_TemplateParserTest_testcase extends Tx_Extbase_Base_testcase
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_fixture09ReturnsCorrectlyRenderedResult() {
+       public function fixture09ReturnsCorrectlyRenderedResult() {
                $templateSource = file_get_contents(dirname(__FILE__) . '/Fixtures/TemplateParserTestFixture09.html', FILE_TEXT);
 
                $variableContainer = new Tx_Fluid_Core_ViewHelper_TemplateVariableContainer(array('idList' => array(0, 1, 2, 3, 4, 5), 'variableName' => 3));
@@ -266,7 +266,7 @@ class Tx_Fluid_Core_TemplateParserTest_testcase extends Tx_Extbase_Base_testcase
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_fixture10ReturnsCorrectlyRenderedResult() {
+       public function fixture10ReturnsCorrectlyRenderedResult() {
                $templateSource = file_get_contents(dirname(__FILE__) . '/Fixtures/TemplateParserTestFixture10.html', FILE_TEXT);
 
                $variableContainer = new Tx_Fluid_Core_ViewHelper_TemplateVariableContainer(array('idList' => array(0, 1, 2, 3, 4, 5)));
@@ -283,7 +283,7 @@ class Tx_Fluid_Core_TemplateParserTest_testcase extends Tx_Extbase_Base_testcase
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_fixture11ReturnsCorrectlyRenderedResult() {
+       public function fixture11ReturnsCorrectlyRenderedResult() {
                $templateSource = file_get_contents(dirname(__FILE__) . '/Fixtures/TemplateParserTestFixture11.html', FILE_TEXT);
 
                $variableContainer = new Tx_Fluid_Core_ViewHelper_TemplateVariableContainer(array());
@@ -302,7 +302,7 @@ class Tx_Fluid_Core_TemplateParserTest_testcase extends Tx_Extbase_Base_testcase
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_fixture12ReturnsCorrectlyRenderedResult() {
+       public function fixture12ReturnsCorrectlyRenderedResult() {
                $templateSource = file_get_contents(dirname(__FILE__) . '/Fixtures/TemplateParserTestFixture12_cdata.html', FILE_TEXT);
 
                $variableContainer = new Tx_Fluid_Core_ViewHelper_TemplateVariableContainer(array());
@@ -322,7 +322,7 @@ class Tx_Fluid_Core_TemplateParserTest_testcase extends Tx_Extbase_Base_testcase
         * @expectedException Tx_Fluid_Core_Parser_Exception
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_fixture13ReturnsCorrectlyRenderedResult() {
+       public function fixture13ReturnsCorrectlyRenderedResult() {
                $templateSource = file_get_contents(dirname(__FILE__) . '/Fixtures/TemplateParserTestFixture13_mandatoryInformation.html', FILE_TEXT);
 
                $templateTree = $this->templateParser->parse($templateSource)->getRootNode();
@@ -332,7 +332,7 @@ class Tx_Fluid_Core_TemplateParserTest_testcase extends Tx_Extbase_Base_testcase
         *
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_postParseFacetIsCalledOnParse() {
+       public function postParseFacetIsCalledOnParse() {
                $templateParser = new Tx_Fluid_Core_Parser_TemplateParser();
                $templateParser->injectObjectFactory(new Tx_Fluid_Compatibility_ObjectFactory());
 
@@ -346,7 +346,7 @@ class Tx_Fluid_Core_TemplateParserTest_testcase extends Tx_Extbase_Base_testcase
         * @expectedException Tx_Fluid_Core_Parser_Exception
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_abortIfUnregisteredArgumentsExist() {
+       public function abortIfUnregisteredArgumentsExist() {
                $mockTemplateParser = $this->getMock($this->buildAccessibleProxy('Tx_Fluid_Core_Parser_TemplateParser'), array('dummy'), array(), '', FALSE);
                $expectedArguments = array(
                        new Tx_Fluid_Core_ViewHelper_ArgumentDefinition('name1', 'string', 'desc', TRUE),
@@ -363,7 +363,7 @@ class Tx_Fluid_Core_TemplateParserTest_testcase extends Tx_Extbase_Base_testcase
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_makeSureThatAbortIfUnregisteredArgumentsExistDoesNotThrowExceptionIfEverythingIsOk() {
+       public function makeSureThatAbortIfUnregisteredArgumentsExistDoesNotThrowExceptionIfEverythingIsOk() {
                $mockTemplateParser = $this->getMock($this->buildAccessibleProxy('Tx_Fluid_Core_Parser_TemplateParser'), array('dummy'), array(), '', FALSE);
                $expectedArguments = array(
                        new Tx_Fluid_Core_ViewHelper_ArgumentDefinition('name1', 'string', 'desc', TRUE),
@@ -380,7 +380,7 @@ class Tx_Fluid_Core_TemplateParserTest_testcase extends Tx_Extbase_Base_testcase
         * @expectedException Tx_Fluid_Core_Parser_Exception
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_abortIfRequiredArgumentsAreMissingShouldThrowExceptionIfRequiredArgumentIsMissing() {
+       public function abortIfRequiredArgumentsAreMissingShouldThrowExceptionIfRequiredArgumentIsMissing() {
                $mockTemplateParser = $this->getMock($this->buildAccessibleProxy('Tx_Fluid_Core_Parser_TemplateParser'), array('dummy'), array(), '', FALSE);
                $expectedArguments = array(
                        new Tx_Fluid_Core_ViewHelper_ArgumentDefinition('name1', 'string', 'desc', TRUE),
@@ -396,7 +396,7 @@ class Tx_Fluid_Core_TemplateParserTest_testcase extends Tx_Extbase_Base_testcase
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_abortIfRequiredArgumentsAreMissingShouldNotThrowExceptionIfRequiredArgumentIsNotMissing() {
+       public function abortIfRequiredArgumentsAreMissingShouldNotThrowExceptionIfRequiredArgumentIsNotMissing() {
                $mockTemplateParser = $this->getMock($this->buildAccessibleProxy('Tx_Fluid_Core_Parser_TemplateParser'), array('dummy'), array(), '', FALSE);
                $expectedArguments = array(
                        new Tx_Fluid_Core_ViewHelper_ArgumentDefinition('name1', 'string', 'desc', FALSE),
@@ -412,7 +412,7 @@ class Tx_Fluid_Core_TemplateParserTest_testcase extends Tx_Extbase_Base_testcase
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_fixture14ReturnsCorrectObjectTree($file = '/Fixtures/TemplateParserTestFixture14.html') {
+       public function fixture14ReturnsCorrectObjectTree($file = '/Fixtures/TemplateParserTestFixture14.html') {
                $templateSource = file_get_contents(dirname(__FILE__) . $file, FILE_TEXT);
 
                $rootNode = new Tx_Fluid_Core_Parser_SyntaxTree_RootNode();
index cb099b0..f0dbf10 100644 (file)
@@ -45,7 +45,7 @@ class Tx_Fluid_Core_VariableContainerTest_testcase extends Tx_Extbase_Base_testc
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_addedObjectsCanBeRetrievedAgain() {
+       public function addedObjectsCanBeRetrievedAgain() {
                $object = "StringObject";
                $this->variableContainer->add("variable", $object);
                $this->assertSame($this->variableContainer->get('variable'), $object, 'The retrieved object from the context is not the same as the stored object.');
@@ -55,7 +55,7 @@ class Tx_Fluid_Core_VariableContainerTest_testcase extends Tx_Extbase_Base_testc
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_addedObjectsExistInArray() {
+       public function addedObjectsExistInArray() {
                $object = "StringObject";
                $this->variableContainer->add("variable", $object);
                $this->assertSame($this->variableContainer->exists('variable'), TRUE, 'The object is reported to not be in the VariableContainer, but it is.');
@@ -65,7 +65,7 @@ class Tx_Fluid_Core_VariableContainerTest_testcase extends Tx_Extbase_Base_testc
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_addedObjectsExistInAllIdentifiers() {
+       public function addedObjectsExistInAllIdentifiers() {
                $object = "StringObject";
                $this->variableContainer->add("variable", $object);
                $this->assertEquals($this->variableContainer->getAllIdentifiers(), array('variable'), 'Added key is not visible in getAllIdentifiers');
@@ -76,7 +76,7 @@ class Tx_Fluid_Core_VariableContainerTest_testcase extends Tx_Extbase_Base_testc
         * @expectedException Tx_Fluid_Core_RuntimeException
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_contextTakesOnlyArraysInConstructor() {
+       public function contextTakesOnlyArraysInConstructor() {
                new Tx_Fluid_Core_ViewHelper_TemplateVariableContainer("string");
        }
        
@@ -85,7 +85,7 @@ class Tx_Fluid_Core_VariableContainerTest_testcase extends Tx_Extbase_Base_testc
         * @expectedException Tx_Fluid_Core_RuntimeException
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_duplicateIdentifiersThrowException() {
+       public function duplicateIdentifiersThrowException() {
                $this->variableContainer->add('variable', 'string1');
                $this->variableContainer->add('variable', 'string2');
        }
@@ -95,7 +95,7 @@ class Tx_Fluid_Core_VariableContainerTest_testcase extends Tx_Extbase_Base_testc
         * @expectedException Tx_Fluid_Core_RuntimeException
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_gettingNonexistentValueThrowsException() {
+       public function gettingNonexistentValueThrowsException() {
                $this->variableContainer->get('nonexistent');
        }
        
@@ -104,7 +104,7 @@ class Tx_Fluid_Core_VariableContainerTest_testcase extends Tx_Extbase_Base_testc
         * @expectedException Tx_Fluid_Core_RuntimeException
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_deletingNonexistentValueThrowsException() {
+       public function deletingNonexistentValueThrowsException() {
                $this->variableContainer->remove('nonexistent');
        }
        
@@ -112,7 +112,7 @@ class Tx_Fluid_Core_VariableContainerTest_testcase extends Tx_Extbase_Base_testc
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_deleteReallyDeletesObjects() {
+       public function deleteReallyDeletesObjects() {
                $this->variableContainer->add('variable', 'string1');
                $this->variableContainer->remove('variable');
                try {
index 605d127..e3a3aad 100644 (file)
@@ -16,7 +16,7 @@
 /**
  * @package Fluid
  * @subpackage Tests
- * @version $Id: AbstractViewHelperTest.php 2411 2009-05-26 22:00:04Z sebastian $
+ * @version $Id: AbstractViewHelperTest.php 2588 2009-06-09 19:21:45Z sebastian $
  */
 
 include_once(dirname(__FILE__) . '/../Fixtures/TestViewHelper.php');
@@ -26,7 +26,7 @@ include_once(dirname(__FILE__) . '/../Fixtures/TestViewHelper.php');
  *
  * @package
  * @subpackage Tests
- * @version $Id: AbstractViewHelperTest.php 2411 2009-05-26 22:00:04Z sebastian $
+ * @version $Id: AbstractViewHelperTest.php 2588 2009-06-09 19:21:45Z sebastian $
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License, version 2
  */
 require_once(t3lib_extMgm::extPath('extbase', 'Tests/Base_testcase.php'));
@@ -35,7 +35,7 @@ class Tx_Fluid_Core_ViewHelper_AbstractViewHelperTest_testcase extends Tx_Extbas
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_argumentsCanBeRegistered() {
+       public function argumentsCanBeRegistered() {
                $viewHelper = $this->getMock($this->buildAccessibleProxy('Tx_Fluid_Core_ViewHelper_AbstractViewHelper'), array('render'), array(), '', FALSE);
                $viewHelper->injectReflectionService(t3lib_div::makeInstance('Tx_Extbase_Reflection_Service'));
 
@@ -53,7 +53,7 @@ class Tx_Fluid_Core_ViewHelper_AbstractViewHelperTest_testcase extends Tx_Extbas
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_prepareArgumentsCallsInitializeArguments() {
+       public function prepareArgumentsCallsInitializeArguments() {
                $viewHelper = $this->getMock($this->buildAccessibleProxy('Tx_Fluid_Core_ViewHelper_AbstractViewHelper'), array('render', 'initializeArguments'), array(), '', FALSE);
                $viewHelper->injectReflectionService(t3lib_div::makeInstance('Tx_Extbase_Reflection_Service'));
 
@@ -67,7 +67,7 @@ class Tx_Fluid_Core_ViewHelper_AbstractViewHelperTest_testcase extends Tx_Extbas
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_prepareArgumentsRegistersAnnotationBasedArguments() {
+       public function prepareArgumentsRegistersAnnotationBasedArguments() {
 
                $availableClassNames = array(
                        'Tx_Fluid_Core_Fixtures_TestViewHelper',
@@ -92,7 +92,7 @@ class Tx_Fluid_Core_ViewHelper_AbstractViewHelperTest_testcase extends Tx_Extbas
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_validateArgumentsCallsPrepareArguments() {
+       public function validateArgumentsCallsPrepareArguments() {
                $viewHelper = $this->getMock($this->buildAccessibleProxy('Tx_Fluid_Core_ViewHelper_AbstractViewHelper'), array('render', 'prepareArguments'), array(), '', FALSE);
                $viewHelper->injectReflectionService(t3lib_div::makeInstance('Tx_Extbase_Reflection_Service'));
 
@@ -106,7 +106,7 @@ class Tx_Fluid_Core_ViewHelper_AbstractViewHelperTest_testcase extends Tx_Extbas
         * @test
         * @author Robert Lemke <robert@typo3.org>
         */
-       public function test_validateArgumentsAcceptsAllObjectsImplemtingArrayAccessAsAnArray() {
+       public function validateArgumentsAcceptsAllObjectsImplemtingArrayAccessAsAnArray() {
                $viewHelper = $this->getMock($this->buildAccessibleProxy('Tx_Fluid_Core_ViewHelper_AbstractViewHelper'), array('render', 'prepareArguments'), array(), '', FALSE);
 
                $viewHelper->setArguments(new Tx_Fluid_Core_ViewHelper_Arguments(array('test' => new ArrayObject)));
@@ -118,7 +118,7 @@ class Tx_Fluid_Core_ViewHelper_AbstractViewHelperTest_testcase extends Tx_Extbas
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_validateArgumentsCallsTheRightValidators() {
+       public function validateArgumentsCallsTheRightValidators() {
                $viewHelper = $this->getMock($this->buildAccessibleProxy('Tx_Fluid_Core_ViewHelper_AbstractViewHelper'), array('render', 'prepareArguments'), array(), '', FALSE);
                $viewHelper->injectReflectionService(t3lib_div::makeInstance('Tx_Extbase_Reflection_Service'));
 
@@ -140,7 +140,7 @@ class Tx_Fluid_Core_ViewHelper_AbstractViewHelperTest_testcase extends Tx_Extbas
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_setControllerContextSetsTheControllerContext() {
+       public function setControllerContextSetsTheControllerContext() {
                $controllerContext = $this->getMock('Tx_Extbase_MVC_Controller_ControllerContext');
                $viewHelper = $this->getMock($this->buildAccessibleProxy('Tx_Fluid_Core_ViewHelper_AbstractViewHelper'), array('render', 'prepareArguments'), array(), '', FALSE);
 
@@ -152,7 +152,7 @@ class Tx_Fluid_Core_ViewHelper_AbstractViewHelperTest_testcase extends Tx_Extbas
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_setViewHelperVariableContainerSetsTheViewHelperVariableContainer() {
+       public function setViewHelperVariableContainerSetsTheViewHelperVariableContainer() {
                $viewHelperVariableContainer = $this->getMock('Tx_Fluid_Core_ViewHelper_ViewHelperVariableContainer');
                $viewHelper = $this->getMock($this->buildAccessibleProxy('Tx_Fluid_Core_ViewHelper_AbstractViewHelper'), array('render', 'prepareArguments'), array(), '', FALSE);
 
@@ -164,7 +164,7 @@ class Tx_Fluid_Core_ViewHelper_AbstractViewHelperTest_testcase extends Tx_Extbas
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_objectAccessorPostProcessorDisabledSettingIsReturnedToCorrectly() {
+       public function objectAccessorPostProcessorDisabledSettingIsReturnedToCorrectly() {
                $viewHelper = $this->getMock($this->buildAccessibleProxy('Tx_Fluid_Core_ViewHelper_AbstractViewHelper'), array('render', 'prepareArguments'), array(), '', FALSE);
 
                $this->assertTrue($viewHelper->isObjectAccessorPostProcessorEnabled());
index 47966a2..9416212 100644 (file)
@@ -33,7 +33,7 @@ class Tx_Fluid_Core_ArgumentDefinitionTest_testcase extends Tx_Extbase_Base_test
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_objectStoresDataCorrectly() {
+       public function objectStoresDataCorrectly() {
                $name = "This is a name";
                $description = "Example desc";
                $type = "string";
index b3dcc55..3ce7fdc 100644 (file)
@@ -45,7 +45,7 @@ class Tx_Fluid_Core_ViewHelper_ViewHelperVariableContainerTest_testcase extends
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_storedDataCanBeReadOutAgain() {
+       public function storedDataCanBeReadOutAgain() {
                $variable = 'Hello world';
                $this->assertFalse($this->viewHelperVariableContainer->exists('Tx_Fluid_ViewHelpers_TestViewHelper', 'test'));
                $this->viewHelperVariableContainer->add('Tx_Fluid_ViewHelpers_TestViewHelper', 'test', $variable);
@@ -59,7 +59,7 @@ class Tx_Fluid_Core_ViewHelper_ViewHelperVariableContainerTest_testcase extends
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         * @expectedException Tx_Fluid_Core_RuntimeException
         */
-       public function test_gettingNonNonExistentValueThrowsException() {
+       public function gettingNonNonExistentValueThrowsException() {
                $this->viewHelperVariableContainer->get('Tx_Fluid_ViewHelper_NonExistent', 'nonExistentKey');
        }
 
@@ -68,7 +68,7 @@ class Tx_Fluid_Core_ViewHelper_ViewHelperVariableContainerTest_testcase extends
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         * @expectedException Tx_Fluid_Core_RuntimeException
         */
-       public function test_settingKeyWhichIsAlreadyStoredThrowsException() {
+       public function settingKeyWhichIsAlreadyStoredThrowsException() {
                $this->viewHelperVariableContainer->add('Tx_Fluid_ViewHelper_NonExistent', 'nonExistentKey', 'value1');
                $this->viewHelperVariableContainer->add('Tx_Fluid_ViewHelper_NonExistent', 'nonExistentKey', 'value2');
        }
@@ -77,7 +77,7 @@ class Tx_Fluid_Core_ViewHelper_ViewHelperVariableContainerTest_testcase extends
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_aSetValueCanBeRemovedAgain() {
+       public function aSetValueCanBeRemovedAgain() {
                $this->viewHelperVariableContainer->add('Tx_Fluid_ViewHelper_NonExistent', 'nonExistentKey', 'value1');
                $this->viewHelperVariableContainer->remove('Tx_Fluid_ViewHelper_NonExistent', 'nonExistentKey');
                $this->assertFalse($this->viewHelperVariableContainer->exists('Tx_Fluid_ViewHelper_NonExistent', 'nonExistentKey'));
@@ -88,7 +88,7 @@ class Tx_Fluid_Core_ViewHelper_ViewHelperVariableContainerTest_testcase extends
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         * @expectedException Tx_Fluid_Core_RuntimeException
         */
-       public function test_removingNonExistentKeyThrowsException() {
+       public function removingNonExistentKeyThrowsException() {
                $this->viewHelperVariableContainer->remove('Tx_Fluid_ViewHelper_NonExistent', 'nonExistentKey');
        }
 
@@ -96,7 +96,7 @@ class Tx_Fluid_Core_ViewHelper_ViewHelperVariableContainerTest_testcase extends
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_viewCanBeReadOutAgain() {
+       public function viewCanBeReadOutAgain() {
                $view = $this->getMock('Tx_Extbase_MVC_View_ViewInterface');
                $this->viewHelperVariableContainer->setView($view);
                $this->assertSame($view, $this->viewHelperVariableContainer->getView());
index 9345a42..c59e9b0 100644 (file)
@@ -24,7 +24,7 @@ require_once(dirname(__FILE__) . '/ViewHelperBaseTestcase.php');
 /**
  * @package Fluid
  * @subpackage ViewHelpers
- * @version $Id: BaseViewHelperTest.php 2523 2009-06-02 10:35:40Z k-fish $
+ * @version $Id: BaseViewHelperTest.php 2609 2009-06-15 11:21:56Z bwaidelich $
  */
 require_once(t3lib_extMgm::extPath('extbase', 'Tests/Base_testcase.php'));
 class Tx_Fluid_ViewHelpers_BaseViewHelperTest_testcase extends Tx_Fluid_ViewHelpers_ViewHelperBaseTestcase {
@@ -32,10 +32,10 @@ class Tx_Fluid_ViewHelpers_BaseViewHelperTest_testcase extends Tx_Fluid_ViewHelp
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_renderTakesBaseURIFromControllerContext() {
+       public function renderTakesBaseURIFromControllerContext() {
                $baseURI = 'http://typo3.org/';
 
-               $request = $this->getMock('Tx_Fluid_MVC_Web_Request');
+               $request = $this->getMock('Tx_Extbase_MVC_Web_Request');
                $request->expects($this->any())->method('getBaseURI')->will($this->returnValue($baseURI));
 
                $this->controllerContext->expects($this->any())->method('getRequest')->will($this->returnValue($request));
@@ -47,22 +47,5 @@ class Tx_Fluid_ViewHelpers_BaseViewHelperTest_testcase extends Tx_Fluid_ViewHelp
                $actual = $viewHelper->render();
                $this->assertSame($expected, $actual);
        }
-
-       /**
-        * @test
-        * @author Sebastian Kurfürst <sebastian@typo3.org>
-        */
-       public function test_renderAddsFormNameToTemplateVariableContainer() {
-               $formName = 'someFormName';
-
-               $viewHelper = $this->getMock($this->buildAccessibleProxy('Tx_Fluid_ViewHelpers_FormViewHelper'), array('renderChildren', 'renderHiddenIdentityField'), array(), '', FALSE);
-               $this->injectDependenciesIntoViewHelper($viewHelper);
-
-               $viewHelper->setArguments(new Tx_Fluid_Core_ViewHelper_Arguments(array('name' => $formName)));
-
-               $this->viewHelperVariableContainer->expects($this->once())->method('add')->with('Tx_Fluid_ViewHelpers_FormViewHelper', 'formName', $formName);
-               $this->viewHelperVariableContainer->expects($this->once())->method('remove')->with('Tx_Fluid_ViewHelpers_FormViewHelper', 'formName');
-               $viewHelper->render('', array(), NULL, NULL, NULL, NULL);
-       }
 }
 ?>
\ No newline at end of file
index bae0b08..a2408f0 100644 (file)
@@ -42,7 +42,7 @@ class Tx_Fluid_ViewHelpers_ForViewHelperTest_testcase extends Tx_Extbase_Base_te
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_forExecutesTheLoopCorrectly() {
+       public function forExecutesTheLoopCorrectly() {
                $this->viewHelper = new Tx_Fluid_ViewHelpers_ForViewHelper();
                
                $variableContainer = new Tx_Fluid_Core_ViewHelper_TemplateVariableContainer(array());
index 9b63be9..b5584b0 100644 (file)
@@ -16,7 +16,7 @@
 /**
  * @package
  * @subpackage
- * @version $Id: AbstractFormViewHelperTest.php 2522 2009-06-02 10:32:21Z k-fish $
+ * @version $Id: AbstractFormViewHelperTest.php 2593 2009-06-09 19:38:29Z k-fish $
  */
 
 require_once(dirname(__FILE__) . '/../ViewHelperBaseTestcase.php');
@@ -25,7 +25,7 @@ require_once(dirname(__FILE__) . '/../ViewHelperBaseTestcase.php');
  *
  * @package
  * @subpackage
- * @version $Id: AbstractFormViewHelperTest.php 2522 2009-06-02 10:32:21Z k-fish $
+ * @version $Id: AbstractFormViewHelperTest.php 2593 2009-06-09 19:38:29Z k-fish $
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License, version 2
  */
 require_once(t3lib_extMgm::extPath('extbase', 'Tests/Base_testcase.php'));
@@ -34,41 +34,31 @@ class Tx_Fluid_ViewHelpers_Form_AbstractFormViewHelperTest_testcase extends Tx_F
        /**
         * @test
         * @author Robert Lemke <robert@typo3.org>
+        * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_ifAnAttributeValueIsAnObjectMaintainedByThePersistenceManagerItIsConvertedToAUUID() {
+       public function ifAnAttributeValueIsADomainObjectItIsConvertedToAUid() {
                $mockPersistenceBackend = $this->getMock('Tx_Fluid_Persistence_BackendInterface');
                $mockPersistenceBackend->expects($this->any())->method('getUUIDByObject')->will($this->returnValue('6f487e40-4483-11de-8a39-0800200c9a66'));
 
                $mockPersistenceManager = $this->getMock('Tx_Fluid_Persistence_ManagerInterface');
                $mockPersistenceManager->expects($this->any())->method('getBackend')->will($this->returnValue($mockPersistenceBackend));
 
-               $className = 'Object' . uniqid();
-               $fullClassName = 'F3\\Fluid\\ViewHelpers\\Form\\' . $className;
-               eval('namespace F3\\Fluid\\ViewHelpers\\Form; class ' . $className . ' implements \\F3\\FLOW3\\Persistence\\Aspect\\DirtyMonitoringInterface {
-                       public function FLOW3_Persistence_isNew() { return FALSE; }
-                       public function FLOW3_Persistence_isDirty($propertyName) {}
-                       public function FLOW3_Persistence_memorizeCleanState($joinPoint = NULL) {}
-                       public function FLOW3_AOP_Proxy_getProperty($name) {}
-                       public function FLOW3_AOP_Proxy_getProxyTargetClassName() {}
-                       public function __clone() {}
-               }');
-               $object = $this->getMock($fullClassName);
-               $object->expects($this->any())->method('FLOW3_Persistence_isNew')->will($this->returnValue(FALSE));
+               $object = $this->getMock($this->buildAccessibleProxy('Tx_Extbase_DomainObject_AbstractDomainObject'), array('dummy'));
+               $object->_set('uid', '123');
 
                $formViewHelper = $this->getMock($this->buildAccessibleProxy('Tx_Fluid_ViewHelpers_Form_AbstractFormViewHelper'), array('dummy'), array(), '', FALSE);
-               $formViewHelper->injectPersistenceManager($mockPersistenceManager);
                $formViewHelper->_set('arguments', array('name' => 'foo', 'value' => $object, 'property' => NULL));
                $formViewHelper->expects($this->any())->method('isObjectAccessorMode')->will($this->returnValue(FALSE));
 
-               $this->assertSame('foo[__identity]', $formViewHelper->_call('getName'));
-               $this->assertSame('6f487e40-4483-11de-8a39-0800200c9a66', $formViewHelper->_call('getValue'));
+               $this->assertSame('foo[uid]', $formViewHelper->_call('getName'));
+               $this->assertSame('123', $formViewHelper->_call('getValue'));
        }
 
        /**
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_getNameBuildsNameFromPropertyAndFormNameIfInObjectAccessorMode() {
+       public function getNameBuildsNameFromPropertyAndFormNameIfInObjectAccessorMode() {
                $formViewHelper = $this->getMock($this->buildAccessibleProxy('Tx_Fluid_ViewHelpers_Form_AbstractFormViewHelper'), array('isObjectAccessorMode'), array(), '', FALSE);
                $this->injectDependenciesIntoViewHelper($formViewHelper);
 
@@ -85,7 +75,7 @@ class Tx_Fluid_ViewHelpers_Form_AbstractFormViewHelperTest_testcase extends Tx_F
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_getValueBuildsValueFromPropertyAndFormObjectIfInObjectAccessorMode() {
+       public function getValueBuildsValueFromPropertyAndFormObjectIfInObjectAccessorMode() {
                $formViewHelper = $this->getMock($this->buildAccessibleProxy('Tx_Fluid_ViewHelpers_Form_AbstractFormViewHelper'), array('isObjectAccessorMode'), array(), '', FALSE);
                $this->injectDependenciesIntoViewHelper($formViewHelper);
 
@@ -113,7 +103,7 @@ class Tx_Fluid_ViewHelpers_Form_AbstractFormViewHelperTest_testcase extends Tx_F
         * @test
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         */
-       public function test_isObjectAccessorModeReturnsTrueIfPropertyIsSetAndFormObjectIsGiven() {
+       public function isObjectAccessorModeReturnsTrueIfPropertyIsSetAndFormObjectIsGiven() {
                $formViewHelper = $this->getMock($this->buildAccessibleProxy('Tx_Fluid_ViewHelpers_Form_AbstractFormViewHelper'), array('dummy'), array(), '', FALSE);
                $this->injectDependenciesIntoViewHelper($formViewHelper);
 
index fb0276e..73428bd 100644 (file)
@@ -47,7 +47,7 @@ class Tx_Fluid_ViewHelpers_Form_SelectViewHelperTest_testcase extends Tx_Extbase
         * @test
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_selectCorrectlySetsTagName() {
+       public function selectCorrectlySetsTagName() {
                $tagBuilderMock = $this->getMock('Tx_Fluid_Core_ViewHelper_TagBuilder', array('setTagName'), array(), '', FALSE);
                $tagBuilderMock->expects($this->once())->method('setTagName')->with('select');
                $this->viewHelper->injectTagBuilder($tagBuilderMock);
@@ -62,7 +62,7 @@ class Tx_Fluid_ViewHelpers_Form_SelectViewHelperTest_testcase extends Tx_Extbase
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_selectCreatesExpectedOptions() {
+       public function selectCreatesExpectedOptions() {
                $tagBuilderMock = $this->getMock('Tx_Fluid_Core_ViewHelper_TagBuilder', array('addAttribute', 'setContent', 'render'), array(), '', FALSE);
                $tagBuilderMock->expects($this->once())->method('addAttribute')->with('name', 'myName');
                $tagBuilderMock->expects($this->once())->method('setContent')->with('<option value="value1">label1</option>' . chr(10) . '<option value="value2" selected="selected">label2</option>' . chr(10));
@@ -87,7 +87,7 @@ class Tx_Fluid_ViewHelpers_Form_SelectViewHelperTest_testcase extends Tx_Extbase
         * @test
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_multipleSelectCreatesExpectedOptions() {
+       public function multipleSelectCreatesExpectedOptions() {
                $tagBuilderMock = $this->getMock('Tx_Fluid_Core_ViewHelper_TagBuilder', array('addAttribute', 'setContent', 'render'), array(), '', FALSE);
                $tagBuilderMock->expects($this->at(0))->method('addAttribute')->with('multiple', 'multiple');
                $tagBuilderMock->expects($this->at(1))->method('addAttribute')->with('name', 'myName[]');
@@ -117,22 +117,16 @@ class Tx_Fluid_ViewHelpers_Form_SelectViewHelperTest_testcase extends Tx_Extbase
         * @author Bastian Waidelich <bastian@typo3.org>
         * @author Robert Lemke <robert@typo3.org>
         */
-       public function test_selectOnDomainObjectsCreatesExpectedOptions() {
-               $mockPersistenceBackend = $this->getMock('Tx_Fluid_Persistence_BackendInterface');
-               $mockPersistenceBackend->expects($this->any())->method('getUUIDByObject')->will($this->returnValue(NULL));
-
-               $mockPersistenceManager = $this->getMock('Tx_Fluid_Persistence_ManagerInterface');
-               $mockPersistenceManager->expects($this->any())->method('getBackend')->will($this->returnValue($mockPersistenceBackend));
-
+       public function selectOnDomainObjectsCreatesExpectedOptions() {
                $tagBuilderMock = $this->getMock('Tx_Fluid_Core_ViewHelper_TagBuilder', array('addAttribute', 'setContent', 'render'), array(), '', FALSE);
                $tagBuilderMock->expects($this->once())->method('addAttribute')->with('name', 'myName');
-               $tagBuilderMock->expects($this->once())->method('setContent')->with('<option value="1">Ingmar</option>' . chr(10) . '<option value="2" selected="selected">Sebastian</option>' . chr(10) . '<option value="3">Robert</option>' . chr(10));
+               $tagBuilderMock->expects($this->once())->method('setContent')->with('<option value="1">Ingmar</option>' . chr(10) . '<option value="3" selected="selected">Sebastian</option>' . chr(10) . '<option value="2">Robert</option>' . chr(10));
                $tagBuilderMock->expects($this->once())->method('render');
                $this->viewHelper->injectTagBuilder($tagBuilderMock);
 
                $user_is = new Tx_Fluid_ViewHelpers_Fixtures_UserDomainClass(1, 'Ingmar', 'Schlecht');
-               $user_sk = new Tx_Fluid_ViewHelpers_Fixtures_UserDomainClass(2, 'Sebastian', 'Kurfuerst');
-               $user_rl = new Tx_Fluid_ViewHelpers_Fixtures_UserDomainClass(3, 'Robert', 'Lemke');
+               $user_sk = new Tx_Fluid_ViewHelpers_Fixtures_UserDomainClass(3, 'Sebastian', 'Kurfuerst');
+               $user_rl = new Tx_Fluid_ViewHelpers_Fixtures_UserDomainClass(2, 'Robert', 'Lemke');
                $arguments = new Tx_Fluid_Core_ViewHelper_Arguments(array(
                        'options' => array(
                                $user_is,
@@ -145,7 +139,6 @@ class Tx_Fluid_ViewHelpers_Form_SelectViewHelperTest_testcase extends Tx_Extbase
                        'name' => 'myName'
                ));
 
-               $this->viewHelper->injectPersistenceManager($mockPersistenceManager);
                $this->viewHelper->setArguments($arguments);
                $this->viewHelper->initialize();
                $this->viewHelper->render();
@@ -155,7 +148,7 @@ class Tx_Fluid_ViewHelpers_Form_SelectViewHelperTest_testcase extends Tx_Extbase
         * @test
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_multipleSelectOnDomainObjectsCreatesExpectedOptions() {
+       public function multipleSelectOnDomainObjectsCreatesExpectedOptions() {
                $tagBuilderMock = $this->getMock('Tx_Fluid_Core_ViewHelper_TagBuilder', array('addAttribute', 'setContent', 'render'), array(), '', FALSE);
                $tagBuilderMock->expects($this->at(0))->method('addAttribute')->with('multiple', 'multiple');
                $tagBuilderMock->expects($this->at(1))->method('addAttribute')->with('name', 'myName[]');
index 5603311..6994cca 100644 (file)
@@ -46,7 +46,7 @@ class Tx_Fluid_ViewHelpers_Form_TextareaViewHelperTest_testcase extends Tx_Extba
         * @test
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_textareaCorrectlySetsTagName() {
+       public function textareaCorrectlySetsTagName() {
                $tagBuilderMock = $this->getMock('Tx_Fluid_Core_ViewHelper_TagBuilder', array('setTagName'), array(), '', FALSE);
                $tagBuilderMock->expects($this->once())->method('setTagName')->with('textarea');
                $this->viewHelper->injectTagBuilder($tagBuilderMock);
@@ -61,7 +61,7 @@ class Tx_Fluid_ViewHelpers_Form_TextareaViewHelperTest_testcase extends Tx_Extba
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_textareaCorrectlySetsNameAttributeAndContent() {
+       public function textareaCorrectlySetsNameAttributeAndContent() {
                $tagBuilderMock = $this->getMock('Tx_Fluid_Core_ViewHelper_TagBuilder', array('addAttribute', 'setContent', 'render'), array(), '', FALSE);
                $tagBuilderMock->expects($this->once())->method('addAttribute')->with('name', 'NameOfTextarea');
                $tagBuilderMock->expects($this->once())->method('setContent')->with('Current value');
index a955322..5273ebb 100644 (file)
@@ -46,7 +46,7 @@ class Tx_Fluid_ViewHelpers_Form_TextboxViewHelperTest_testcase extends Tx_Extbas
         * @test
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_selectCorrectlySetsTagName() {
+       public function selectCorrectlySetsTagName() {
                $tagBuilderMock = $this->getMock('Tx_Fluid_Core_ViewHelper_TagBuilder', array('setTagName'), array(), '', FALSE);
                $tagBuilderMock->expects($this->once())->method('setTagName')->with('input');
                $this->viewHelper->injectTagBuilder($tagBuilderMock);
@@ -61,7 +61,7 @@ class Tx_Fluid_ViewHelpers_Form_TextboxViewHelperTest_testcase extends Tx_Extbas
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_textboxCorrectlySetsTypeNameAndValueAttributes() {
+       public function textboxCorrectlySetsTypeNameAndValueAttributes() {
                $tagBuilderMock = $this->getMock('Tx_Fluid_Core_ViewHelper_TagBuilder', array('addAttribute', 'setContent', 'render'), array(), '', FALSE);
                $tagBuilderMock->expects($this->at(0))->method('addAttribute')->with('type', 'text');
                $tagBuilderMock->expects($this->at(1))->method('addAttribute')->with('name', 'NameOfTextbox');
index 837151a..45e8b8e 100644 (file)
@@ -32,7 +32,7 @@ class Tx_Fluid_ViewHelpers_Format_CurrencyViewHelperTest_testcase extends Tx_Ext
         * @test
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_viewHelperRoundsFloatCorrectly() {
+       public function viewHelperRoundsFloatCorrectly() {
                $viewHelper = $this->getMock('Tx_Fluid_ViewHelpers_Format_CurrencyViewHelper', array('renderChildren'));
                $viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue(123.456));
                $actualResult = $viewHelper->render();
@@ -43,7 +43,7 @@ class Tx_Fluid_ViewHelpers_Format_CurrencyViewHelperTest_testcase extends Tx_Ext
         * @test
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_viewHelperRendersCurrencySign() {
+       public function viewHelperRendersCurrencySign() {
                $viewHelper = $this->getMock('Tx_Fluid_ViewHelpers_Format_CurrencyViewHelper', array('renderChildren'));
                $viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue(123));
                $actualResult = $viewHelper->render('foo');
@@ -54,7 +54,7 @@ class Tx_Fluid_ViewHelpers_Format_CurrencyViewHelperTest_testcase extends Tx_Ext
         * @test
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_viewHelperRespectsDecimalSeparator() {
+       public function viewHelperRespectsDecimalSeparator() {
                $viewHelper = $this->getMock('Tx_Fluid_ViewHelpers_Format_CurrencyViewHelper', array('renderChildren'));
                $viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue(12345));
                $actualResult = $viewHelper->render('', '|');
@@ -65,7 +65,7 @@ class Tx_Fluid_ViewHelpers_Format_CurrencyViewHelperTest_testcase extends Tx_Ext
         * @test
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_viewHelperRespectsThousandsSeparator() {
+       public function viewHelperRespectsThousandsSeparator() {
                $viewHelper = $this->getMock('Tx_Fluid_ViewHelpers_Format_CurrencyViewHelper', array('renderChildren'));
                $viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue(12345));
                $actualResult = $viewHelper->render('', ',', '|');
@@ -76,7 +76,7 @@ class Tx_Fluid_ViewHelpers_Format_CurrencyViewHelperTest_testcase extends Tx_Ext
         * @test
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_viewHelperRendersNullValues() {
+       public function viewHelperRendersNullValues() {
                $viewHelper = $this->getMock('Tx_Fluid_ViewHelpers_Format_CurrencyViewHelper', array('renderChildren'));
                $viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue(NULL));
                $actualResult = $viewHelper->render();
@@ -87,7 +87,7 @@ class Tx_Fluid_ViewHelpers_Format_CurrencyViewHelperTest_testcase extends Tx_Ext
         * @test
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_viewHelperRendersNegativeAmounts() {
+       public function viewHelperRendersNegativeAmounts() {
                $viewHelper = $this->getMock('Tx_Fluid_ViewHelpers_Format_CurrencyViewHelper', array('renderChildren'));
                $viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue(-123.456));
                $actualResult = $viewHelper->render();
index 74f6a0c..03cb6cb 100644 (file)
@@ -32,7 +32,7 @@ class Tx_Fluid_ViewHelpers_Format_DateViewHelperTest_testcase extends Tx_Extbase
         * @test
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_viewHelperFormatsDateCorrectly() {
+       public function viewHelperFormatsDateCorrectly() {
                $viewHelper = $this->getMock('Tx_Fluid_ViewHelpers_Format_DateViewHelper', array('renderChildren'));
                $viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue(new DateTime('1980-12-13')));
                $actualResult = $viewHelper->render();
@@ -43,7 +43,7 @@ class Tx_Fluid_ViewHelpers_Format_DateViewHelperTest_testcase extends Tx_Extbase
         * @test
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_viewHelperFormatsDateStringCorrectly() {
+       public function viewHelperFormatsDateStringCorrectly() {
                $viewHelper = $this->getMock('Tx_Fluid_ViewHelpers_Format_DateViewHelper', array('renderChildren'));
                $viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue('1980-12-13'));
                $actualResult = $viewHelper->render();
@@ -54,7 +54,7 @@ class Tx_Fluid_ViewHelpers_Format_DateViewHelperTest_testcase extends Tx_Extbase
         * @test
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_viewHelperRespectsCustomFormat() {
+       public function viewHelperRespectsCustomFormat() {
                $viewHelper = $this->getMock('Tx_Fluid_ViewHelpers_Format_DateViewHelper', array('renderChildren'));
                $viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue(new DateTime('1980-02-01')));
                $actualResult = $viewHelper->render('d.m.Y');
@@ -65,7 +65,7 @@ class Tx_Fluid_ViewHelpers_Format_DateViewHelperTest_testcase extends Tx_Extbase
         * @test
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_viewHelperReturnsEmptyStringIfNULLIsGiven() {
+       public function viewHelperReturnsEmptyStringIfNULLIsGiven() {
                $viewHelper = $this->getMock('Tx_Fluid_ViewHelpers_Format_DateViewHelper', array('renderChildren'));
                $viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue(NULL));
                $actualResult = $viewHelper->render();
@@ -76,7 +76,7 @@ class Tx_Fluid_ViewHelpers_Format_DateViewHelperTest_testcase extends Tx_Extbase
         * @test
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_viewHelperThrowsExceptionIfDateStringCantBeParsed() {
+       public function viewHelperThrowsExceptionIfDateStringCantBeParsed() {
                $viewHelper = $this->getMock('Tx_Fluid_ViewHelpers_Format_DateViewHelper', array('renderChildren'));
                $viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue('foo'));
                try {
index 81cd66f..7b5099c 100644 (file)
@@ -32,7 +32,7 @@ class Tx_Fluid_ViewHelpers_Format_Nl2brViewHelperTest_testcase extends Tx_Extbas
         * @test
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_viewHelperDoesNotModifyTextWithoutLineBreaks() {
+       public function viewHelperDoesNotModifyTextWithoutLineBreaks() {
                $viewHelper = $this->getMock('Tx_Fluid_ViewHelpers_Format_Nl2brViewHelper', array('renderChildren'));
                $viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue('<p class="bodytext">Some Text without line breaks</p>'));
                $actualResult = $viewHelper->render();
@@ -43,7 +43,7 @@ class Tx_Fluid_ViewHelpers_Format_Nl2brViewHelperTest_testcase extends Tx_Extbas
         * @test
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_viewHelperConvertsLineBreaksToBRTags() {
+       public function viewHelperConvertsLineBreaksToBRTags() {
                $viewHelper = $this->getMock('Tx_Fluid_ViewHelpers_Format_Nl2brViewHelper', array('renderChildren'));
                $viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue('Line 1' . chr(10) . 'Line 2'));
                $actualResult = $viewHelper->render();
@@ -54,7 +54,7 @@ class Tx_Fluid_ViewHelpers_Format_Nl2brViewHelperTest_testcase extends Tx_Extbas
         * @test
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_viewHelperConvertsWindowsLineBreaksToBRTags() {
+       public function viewHelperConvertsWindowsLineBreaksToBRTags() {
                $viewHelper = $this->getMock('Tx_Fluid_ViewHelpers_Format_Nl2brViewHelper', array('renderChildren'));
                $viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue('Line 1' . chr(13) . chr(10) . 'Line 2'));
                $actualResult = $viewHelper->render();
index 010dc8a..a612af2 100644 (file)
@@ -32,7 +32,7 @@ class Tx_Fluid_ViewHelpers_Format_NumberViewHelperTest_testcase extends Tx_Extba
         * @test
         * @author Christopher Hlubek <hlubek@networkteam.com>
         */
-       public function test_formatNumberDefaultsToEnglishNotationWithTwoDecimals() {
+       public function formatNumberDefaultsToEnglishNotationWithTwoDecimals() {
                $viewHelper = $this->getMock('Tx_Fluid_ViewHelpers_Format_NumberViewHelper', array('renderChildren'));
                $viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue(10000.0 / 3.0));
                $actualResult = $viewHelper->render();
@@ -43,7 +43,7 @@ class Tx_Fluid_ViewHelpers_Format_NumberViewHelperTest_testcase extends Tx_Extba
         * @test
         * @author Christopher Hlubek <hlubek@networkteam.com>
         */
-       public function test_formatNumberWithDecimalsDecimalPointAndSeparator() {
+       public function formatNumberWithDecimalsDecimalPointAndSeparator() {
                $viewHelper = $this->getMock('Tx_Fluid_ViewHelpers_Format_NumberViewHelper', array('renderChildren'));
                $viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue(10000.0 / 3.0));
                $actualResult = $viewHelper->render(3, ',', '.');
index cfdbd07..5dd52e0 100644 (file)
@@ -32,7 +32,7 @@ class Tx_Fluid_ViewHelpers_Format_PrintfViewHelperTest_testcase extends Tx_Extba
         * @test
         * @author Christopher Hlubek <hlubek@networkteam.com>
         */
-       public function test_viewHelperCanUseArrayAsArgument() {
+       public function viewHelperCanUseArrayAsArgument() {
                $viewHelper = $this->getMock('Tx_Fluid_ViewHelpers_Format_PrintfViewHelper', array('renderChildren'));
                $viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue('%04d-%02d-%02d'));
                $actualResult = $viewHelper->render(array('year' => 2009, 'month' => 4, 'day' => 5));
@@ -43,7 +43,7 @@ class Tx_Fluid_ViewHelpers_Format_PrintfViewHelperTest_testcase extends Tx_Extba
         * @test
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_viewHelperCanSwapMultipleArguments() {
+       public function viewHelperCanSwapMultipleArguments() {
                $viewHelper = $this->getMock('Tx_Fluid_ViewHelpers_Format_PrintfViewHelper', array('renderChildren'));
                $viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue('%2$s %1$d %3$s %2$s'));
                $actualResult = $viewHelper->render(array(123, 'foo', 'bar'));
index 5b9dbb7..745f933 100644 (file)
@@ -33,7 +33,7 @@ class Tx_Fluid_ViewHelpers_IfViewHelperTest_testcase extends Tx_Extbase_Base_tes
         * @test
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_viewHelperRendersChildrenIfConditionIsTrueAndNoThenViewHelperChildExists() {
+       public function viewHelperRendersChildrenIfConditionIsTrueAndNoThenViewHelperChildExists() {
                $mockViewHelper = $this->getMock('Tx_Fluid_ViewHelpers_IfViewHelper', array('renderChildren'));
                $mockViewHelper->expects($this->at(0))->method('renderChildren')->will($this->returnValue('foo'));
 
@@ -45,7 +45,7 @@ class Tx_Fluid_ViewHelpers_IfViewHelperTest_testcase extends Tx_Extbase_Base_tes
         * @test
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_viewHelperRendersThenViewHelperChildIfConditionIsTrueAndThenViewHelperChildExists() {
+       public function viewHelperRendersThenViewHelperChildIfConditionIsTrueAndThenViewHelperChildExists() {
                $renderingContext = $this->getMock('Tx_Fluid_Core_Rendering_RenderingContext');
 
                $mockThenViewHelperNode = $this->getMock('Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode', array('getViewHelperClassName', 'evaluate', 'setRenderingContext'), array(), '', FALSE);
@@ -64,7 +64,7 @@ class Tx_Fluid_ViewHelpers_IfViewHelperTest_testcase extends Tx_Extbase_Base_tes
         * @test
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_renderReturnsEmptyStringIfConditionIsFalseAndNoThenViewHelperChildExists() {
+       public function renderReturnsEmptyStringIfConditionIsFalseAndNoThenViewHelperChildExists() {
                $viewHelper = new Tx_Fluid_ViewHelpers_IfViewHelper();
 
                $actualResult = $viewHelper->render(FALSE);
@@ -75,7 +75,7 @@ class Tx_Fluid_ViewHelpers_IfViewHelperTest_testcase extends Tx_Extbase_Base_tes
         * @test
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_viewHelperRendersElseViewHelperChildIfConditionIsFalseAndNoThenViewHelperChildExists() {
+       public function viewHelperRendersElseViewHelperChildIfConditionIsFalseAndNoThenViewHelperChildExists() {
                $renderingContext = $this->getMock('Tx_Fluid_Core_Rendering_RenderingContext');
 
                $mockElseViewHelperNode = $this->getMock('Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode', array('getViewHelperClassName', 'evaluate', 'setRenderingContext'), array(), '', FALSE);
index 38145ab..8c47e3a 100644 (file)
@@ -35,7 +35,7 @@ class Tx_Fluid_ViewHelpers_Link_ActionViewHelperTest_testcase extends Tx_Extbase
         * @test
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_xy() {
+       public function xy() {
                $this->markTestIncomplete('Yet no test case has been written for the action link view helper.');
        }
 }
index ae0208d..3b89c07 100644 (file)
@@ -35,7 +35,7 @@ class Tx_Fluid_ViewHelpers_Link_EmailViewHelperTest_testcase extends Tx_Extbase_
         * @test
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_xy() {
+       public function xy() {
                $this->markTestIncomplete('Yet no test case has been written for the email link view helper.');
        }
 }
index 86750ee..063f2c7 100644 (file)
@@ -35,7 +35,7 @@ class Tx_Fluid_ViewHelpers_Link_ExternalViewHelperTest_testcase extends Tx_Extba
         * @test
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_xy() {
+       public function xy() {
                $this->markTestIncomplete('Yet no test case has been written for the external link view helper.');
        }
 }
index 5324349..b446f2b 100644 (file)
@@ -35,7 +35,7 @@ class Tx_Fluid_ViewHelpers_Uri_ActionViewHelperTest_testcase extends Tx_Extbase_
         * @test
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_xy() {
+       public function xy() {
                $this->markTestIncomplete('Yet no test case has been written for the action uri view helper.');
        }
 }
index 35eb777..8d6cf3d 100644 (file)
@@ -35,7 +35,7 @@ class Tx_Fluid_ViewHelpers_Uri_EmailViewHelperTest_testcase extends Tx_Extbase_B
         * @test
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_xy() {
+       public function xy() {
                $this->markTestIncomplete('Yet no test case has been written for the email uri view helper.');
        }
 }
index ae1e787..7435be8 100644 (file)
@@ -35,7 +35,7 @@ class Tx_Fluid_ViewHelpers_Uri_ExternalViewHelperTest_testcase extends Tx_Extbas
         * @test
         * @author Bastian Waidelich <bastian@typo3.org>
         */
-       public function test_xy() {
+       public function xy() {
                $this->markTestIncomplete('Yet no test case has been written for the external uri view helper.');
        }
 }
index 3a89580..25b40c7 100644 (file)
@@ -1,36 +1,31 @@
 <?php
-/***************************************************************
-*  Copyright notice
-*
-*  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
-*  All rights reserved
-*
-*  This class is a backport of the corresponding class of FLOW3.
-*  All credits go to the v5 team.
-*
-*  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!
-***************************************************************/
+
+/*                                                                        *
+ * This script belongs to the FLOW3 package "Fluid".                      *
+ *                                                                        *
+ * It 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 3 of the License, or (at your      *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General      *
+ * Public License for more details.                                       *
+ *                                                                        *
+ * You should have received a copy of the GNU General Public License      *
+ * along with the script.                                                 *
+ * If not, see http://www.gnu.org/licenses/gpl.html                       *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
 
 /**
  * @package Fluid
  * @subpackage ViewHelpers
- * @version $Id:$
+ * @version $Id: ViewHelperBaseTestcase.php 2609 2009-06-15 11:21:56Z bwaidelich $
  */
-class Tx_Fluid_ViewHelpers_ViewHelperBaseTestcase extends Tx_Extbase_Base_testcase {
+abstract class Tx_Fluid_ViewHelpers_ViewHelperBaseTestcase extends Tx_Extbase_Base_testcase {
        public function setUp() {
                $this->viewHelperVariableContainer = $this->getMock('Tx_Fluid_Core_ViewHelper_ViewHelperVariableContainer');
                $this->templateVariableContainer = $this->getMock('Tx_Fluid_Core_ViewHelper_TemplateVariableContainer');
@@ -44,7 +39,7 @@ class Tx_Fluid_ViewHelpers_ViewHelperBaseTestcase extends Tx_Extbase_Base_testca
                $viewHelper->setViewHelperVariableContainer($this->viewHelperVariableContainer);
                $viewHelper->setTemplateVariableContainer($this->templateVariableContainer);
                $viewHelper->setControllerContext($this->controllerContext);
-               if ($viewHelper instanceof _F3_Fluid_Core_ViewHelper_TagBasedViewHelper) {
+               if ($viewHelper instanceof Tx_Fluid_Core_ViewHelper_TagBasedViewHelper) {
                        $viewHelper->injectTagBuilder($this->tagBuilder);
                }
        }