Example #1
0
 public function testGetResult_withStubWrapper_withDefaultClosure_shouldReturnExpectValue()
 {
     $expected = 'bar';
     //
     // Attach stub wrapper
     // into ServicesContrainer
     // with WrapperContract as alias
     //
     $wrapper = static::stubWrapper();
     ServicesContainer::attach($wrapper, Wrapper::class);
     $template = ['foo'];
     $shell = new Shell($template, []);
     $result = $shell->getResult();
     $this->assertEquals($expected, $result);
 }