예제 #1
0
 /**
  * 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);
 }
예제 #2
0
 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'));
 }
예제 #3
0
 /**
  * @dataProvider processTextDataProvider
  */
 public function testProcessText($value, $expected, $domain = null)
 {
     $result = $this->helper->processText($value, $domain);
     $this->assertSame($expected, $result);
 }