/** * Normalizes and translates (if needed) labels in the given value. * * @param mixed $value * @param string|null $domain * * @return mixed */ public function text($value, $domain = null) { return $this->textHelper->processText($value, $domain); }
public function testText() { $this->textHelper->expects($this->once())->method('processText')->with('test', 'domain')->will($this->returnValue('processed')); $this->assertEquals('processed', $this->helper->text('test', 'domain')); }
/** * @dataProvider processTextDataProvider */ public function testProcessText($value, $expected, $domain = null) { $result = $this->helper->processText($value, $domain); $this->assertSame($expected, $result); }