Browse Source

Use StringTemplate constructor in test cases.

mark_story 12 years ago
parent
commit
ff9de4e657

+ 1 - 2
tests/TestCase/View/Input/CheckboxTest.php

@@ -33,8 +33,7 @@ class CheckboxTest extends TestCase {
 		$templates = [
 			'checkbox' => '<input type="checkbox" name="{{name}}" value="{{value}}"{{attrs}}>',
 		];
-		$this->templates = new StringTemplate();
-		$this->templates->add($templates);
+		$this->templates = new StringTemplate($templates);
 	}
 
 /**

+ 1 - 2
tests/TestCase/View/Input/MultiCheckboxTest.php

@@ -35,8 +35,7 @@ class MultiCheckboxTest extends TestCase {
 			'label' => '<label{{attrs}}>{{text}}</label>',
 			'checkboxContainer' => '<div class="checkbox">{{input}}{{label}}</div>',
 		];
-		$this->templates = new StringTemplate();
-		$this->templates->add($templates);
+		$this->templates = new StringTemplate($templates);
 	}
 
 /**

+ 1 - 2
tests/TestCase/View/Input/RadioTest.php

@@ -36,8 +36,7 @@ class RadioTest extends TestCase {
 			'label' => '<label{{attrs}}>{{text}}</label>',
 			'radioContainer' => '{{input}}{{label}}',
 		];
-		$this->templates = new StringTemplate();
-		$this->templates->add($templates);
+		$this->templates = new StringTemplate($templates);
 	}
 
 /**

+ 1 - 2
tests/TestCase/View/Input/SelectBoxTest.php

@@ -36,8 +36,7 @@ class SelectBoxTest extends TestCase {
 			'option' => '<option value="{{value}}"{{attrs}}>{{text}}</option>',
 			'optgroup' => '<optgroup label="{{label}}"{{attrs}}>{{content}}</optgroup>',
 		];
-		$this->templates = new StringTemplate();
-		$this->templates->add($templates);
+		$this->templates = new StringTemplate($templates);
 	}
 
 /**

+ 1 - 2
tests/TestCase/View/Input/TextTest.php

@@ -28,8 +28,7 @@ class TextTest extends TestCase {
 		$templates = [
 			'input' => '<input type="{{type}}" name="{{name}}"{{attrs}}>',
 		];
-		$this->templates = new StringTemplate();
-		$this->templates->add($templates);
+		$this->templates = new StringTemplate($templates);
 	}
 
 /**