format() public method

public format ( $formatter, $arguments = [] )
Example #1
0
 public function testFormatTransfersArgumentsToFormatter()
 {
     $generator = new Generator();
     $provider = new FooProvider();
     $generator->addProvider($provider);
     $this->assertEquals('bazfoo', $generator->format('fooFormatterWithArguments', array('foo')));
 }
Example #2
0
 /**
  * @inheritdoc
  */
 public function convert($value, array $context = array())
 {
     return $this->faker->format($this->formatter, $this->arguments);
 }