_elementFactory->createInline ( 'ValueEscaped', new jQueryTmpl_Token_ValueEscaped(0, array('name'=>'key1'), '') ); $this->assertEquals ( 123.45, $element->setData($this->_data)->render() ); } public function testShouldReturnTagReplacedWithValueWithUncommonKey() { $element = $this->_elementFactory->createInline ( 'ValueEscaped', new jQueryTmpl_Token_ValueEscaped(0, array('name'=>'$wtfKey'), '') ); $this->assertEquals ( 'It works!', $element->setData($this->_data)->render() ); } public function testShouldReturnNonexistantTagReplacedWithEmptyString() { $element = $this->_elementFactory->createInline ( 'ValueEscaped', new jQueryTmpl_Token_ValueEscaped(0, array('name'=>'dneKey'), '') ); $this->assertEquals ( '', $element->setData($this->_data)->render() ); } public function testShouldReturnTagReplacedWithEscapedValue() { $element = $this->_elementFactory->createInline ( 'ValueEscaped', new jQueryTmpl_Token_ValueEscaped(0, array('name'=>'htmlKey'), '') ); $this->assertEquals ( "<span>Some Text & marks "'".</span>", $element->setData($this->_data)->render() ); } }