public function testReplace()
{
$text = 'text';
$template = function () {
};
$options = [];
$replaced = 'replaced text';
$Replacer = $this->getMockBuilder('\\Essence\\Replacer')->disableOriginalConstructor()->getMock();
$Replacer->expects($this->once())->method('replace')->with($this->isEqual($text), $this->isEqual($template), $this->isEqual($options))->will($this->returnValue($replaced));
$Essence = new Essence(['Replacer' => $Replacer]);
$this->assertEquals($replaced, $Essence->replace($text, $template, $options));
}