/** * @covers JeremySells\Templar\Factories\Tpl::add */ public function testAdd() { $this->object->setFile(__DIR__ . "/../templates/hello.tpl.php"); $this->object->add("test", "World"); $this->assertSame("Hello World", $this->object->toString()); $this->object->add("someting missing", "this"); $this->assertSame("Hello World", $this->object->toString()); $this->object->add("test", "replaced text"); $this->assertSame("Hello replaced text", $this->object->toString()); }