/** * singleton * * @return Inventory_Controller */ public static function getInstance() { if (self::$_instance === NULL) { self::$_instance = new Inventory_Controller(); } return self::$_instance; }
public function testGetModels() { $models = Inventory_Controller::getInstance()->getModels(); $this->assertEquals(array('Inventory_Model_InventoryItem', 'Inventory_Model_Status'), $models); }