19 declare(strict_types=1);
28 require_once __DIR__ .
'/ContainerMock.php';
36 $this->assertInstanceOf(LazyProvide::class,
new LazyProvide($this->fail(...)));
39 #[DataProvider('methods')] 40 public function testMethods(
string $method, $return = []): void
43 $provide = $this->mockTree(Provide::class, [$method => $return]);
45 $create =
function () use (&$called, $provide) {
51 $this->assertFalse($called);
52 $this->assertSame($provide->$method(), $instance->$method());
53 $this->assertTrue($called);
testMethods(string $method, $return=[])