euromark 11 years ago
parent
commit
04bb238324
1 changed files with 12 additions and 1 deletions
  1. 12 1
      tests/TestCase/View/Helper/TextHelperTest.php

+ 12 - 1
tests/TestCase/View/Helper/TextHelperTest.php

@@ -82,7 +82,7 @@ class TextHelperTest extends TestCase {
  */
 	public function testTextHelperProxyMethodCalls() {
 		$methods = array(
-			'stripLinks', 'excerpt', 'toList', 'tail',
+			'stripLinks', 'excerpt', 'toList'
 		);
 		$String = $this->getMock(__NAMESPACE__ . '\StringMock', $methods);
 		$Text = new TextHelperTestObject($this->View, array('engine' => __NAMESPACE__ . '\StringMock'));
@@ -102,6 +102,17 @@ class TextHelperTest extends TestCase {
 			$String->expects($this->at(0))->method($method);
 			$Text->{$method}('who', array('what'));
 		}
+
+		$methods = array(
+			'tail'
+		);
+		$String = $this->getMock(__NAMESPACE__ . '\StringMock', $methods);
+		$Text = new TextHelperTestObject($this->View, array('engine' => __NAMESPACE__ . '\StringMock'));
+		$Text->attach($String);
+		foreach ($methods as $method) {
+			$String->expects($this->at(0))->method($method);
+			$Text->{$method}('who', 1, array('what'));
+		}
 	}
 
 /**