public function testProtect() { $diContainer = new DiContainer(); $callback = function () { return 'foo'; }; $diContainer['protected'] = $diContainer->protect($callback); $this->assertSame($callback, $diContainer['protected']); }