Exemple #1
0
 function it_should_encode_data_using_the_parser(Parser $parser)
 {
     $parser->decode([])->willReturn([]);
     $parser->encode(null)->shouldBeCalled();
     $this->beConstructedWith([], $parser);
     $this->get('test');
 }
Exemple #2
0
 public function __construct($data, Parser $parser)
 {
     $this->data = $parser->decode($data);
     $this->parser = $parser;
 }