/** * */ function test_scoped_with_object() { $config = new Config(); $resolver = new Resolver(); $resolver->scope($config); $callback = function () { return $this; }; $scoped = $resolver->scoped($callback); $this->assertInstanceOf(\Closure::class, $scoped); $this->assertTrue($config === $scoped()); }