public function testDestroyInstance() { $count = 0; $this->app->set('testObj', function () use(&$count) { $obj = new \stdClass(); $obj->id = ++$count; return $obj; }); $obj1 = $this->app->get('testObj'); $this->app->destroyInstance('testObj'); $obj2 = $this->app->get('testObj'); $obj3 = $this->app->get('testObj'); $this->assertNotEquals($obj1->id, $obj2->id); $this->assertEquals($obj2->id, $obj3->id); }