_smarty = new Sugar_Smarty; } public function providerSpecialCharactersHandledInTextParameter() { return array( array( 'dog "the" bounty hunter & friends are cool', 'dog "the" bounty hunter & friends are <b>cool</b>', ), array( "dog 'the' bounty hunter", "dog \'the\' bounty hunter" ), ); } /** * @dataProvider providerSpecialCharactersHandledInTextParameter */ public function testSpecialCharactersHandledInTextParameter( $string, $returnedString ) { $this->assertContains($returnedString, smarty_function_sugar_help(array('text'=>$string),$this->_smarty)); } public function testExtraParametersAreAdded() { $string = 'my string'; $output = smarty_function_sugar_help(array('text'=>$string,'foo'=>'bar'),$this->_smarty); $this->assertContains(",foo,bar",$output); } }