Browse Source

Add test for chaining.

euromark 11 years ago
parent
commit
2f7d77ae85
1 changed files with 11 additions and 0 deletions
  1. 11 0
      tests/TestCase/View/ViewVarsTraitTest.php

+ 11 - 0
tests/TestCase/View/ViewVarsTraitTest.php

@@ -59,6 +59,17 @@ class ViewVarsTraitTest extends TestCase {
 	}
 
 /**
+ * test chainable set()
+ *
+ * @return void
+ */
+	public function testSetChained() {
+		$this->subject->set('testing', 'value')
+			->set('foo', 'bar');
+		$this->assertEquals(['testing' => 'value', 'foo' => 'bar'], $this->subject->viewVars);
+	}
+
+/**
  * test set() with 2 params in combine mode
  *
  * @return void