/** * initializes table instance * * @param string $tableName * @throws SchemaException */ private function initTable($tableName) { if (!isset($this->tables[$tableName])) { if ($this->schema->hasTable($tableName)) { $this->tables[$tableName] = $this->createTable($tableName); return; } if ($this->schema->hasView($tableName)) { $this->tables[$tableName] = $this->createView($tableName); return; } throw new SchemaException("Table/View '{$tableName}' not found!"); } }
public function testHasTable() { $this->assertFalse($this->schema->hasTable('unknown')); }