Exemplo n.º 1
0
 public function testShouldFactoryTypeParserWhenSomeArgumentKeyIsANumber()
 {
     $factory = new Factory();
     $arguments = array('a' => true, 'b' => 42, 'c');
     $expectedInstanceType = 'PHPFluent\\Callback\\ArgumentParser\\Type';
     $actualInstance = $factory->parser($arguments);
     $this->assertInstanceOf($expectedInstanceType, $actualInstance);
 }
Exemplo n.º 2
0
 /**
  * @covers ::parser
  */
 public function testFactory()
 {
     $this->assertInstanceOf(Parser::class, Factory::parser());
 }
Exemplo n.º 3
0
 /**
  * {@inheritdoc}
  */
 public function parse(array $arguments, array $parameters)
 {
     $parser = $this->factory->parser($arguments);
     return $parser->parse($arguments, $parameters);
 }