|
|
@@ -95,6 +95,9 @@ class StringTemplateTest extends TestCase
|
|
|
];
|
|
|
$this->template->add($templates);
|
|
|
|
|
|
+ $result = $this->template->format('not there', []);
|
|
|
+ $this->assertNull($result);
|
|
|
+
|
|
|
$result = $this->template->format('text', ['text' => '']);
|
|
|
$this->assertSame('', $result);
|
|
|
|
|
|
@@ -140,22 +143,6 @@ class StringTemplateTest extends TestCase
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * Test formatting a missing template.
|
|
|
- *
|
|
|
- * @expectedException RuntimeException
|
|
|
- * @expectedExceptionMessage Cannot find template named 'missing'
|
|
|
- * @return void
|
|
|
- */
|
|
|
- public function testFormatMissingTemplate()
|
|
|
- {
|
|
|
- $templates = [
|
|
|
- 'text' => '{{text}}',
|
|
|
- ];
|
|
|
- $this->template->add($templates);
|
|
|
- $this->template->format('missing', ['text' => 'missing']);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
* Test loading templates files in the app.
|
|
|
*
|
|
|
* @return void
|