public function testExtend() { $zit = Zit::getInstance(); $zit->extend('myCallable', function () { return 12345; }); $this->assertTrue($zit->myCallable() === 12345); $this->assertTrue(Zit::myCallable() === 12345); }
public function testStashWithSameIdAsProtectedProperty() { $zit = Zit::getInstance(); $instance = new \stdClass(); $instance->id = 'testServices'; $zit->stash('services', $instance); $this->assertTrue($zit->services instanceof \stdClass); $this->assertSame('testServices', $zit->services->id); }
public function test_stash_with_same_id_as_protected_property() { $zit = Zit::make(); $myObject = new \stdClass(); $myObject->id = 'testServices'; $zit->stash('services', $myObject); $this->assertTrue($zit->services instanceof \stdClass); $this->assertSame('testServices', $zit->services->id); }
function minimee() { return Zit::getInstance(); }