public function testSetterCrashes() { $db = AetherORM::init($this->config); $isOk = false; try { $db->foo = 'bar'; } catch (Exception $e) { $isOk = true; } $this->assertTrue($isOk); }
/** * Fetch database instance * * @return boolean */ private function getDb() { if ($this->_orm === null) { try { $this->_orm = AetherORM::init(); $this->_db = $this->_orm->{$this->_database}->getDriver(); } catch (AetherORMMissingConfigException $e) { return false; } catch (Exception $e) { throw $e; } } return true; }
public function testSet() { $orm = AetherORM::init(); $foos = $orm['d']->Foo("id >= 1"); $this->assertTrue(count($foos) > 1); }