driver = new SQLDriver($this->container->get('config')); $friend = new Friend($this->driver); $friend->db->query('CREATE TABLE IF NOT EXISTS "cache" ("key" TEXT NULL, "value" TEXT NULL, PRIMARY KEY ("key"))'); } public function testMissingConfig() { $this->expectException('Aviat\Ion\Exception\ConfigException'); $this->expectExceptionMessage('Missing \'[cache]\' section in database config.'); $this->container->setInstance('config', new Config([])); $this->driver = new SQLDriver($this->container->get('config')); } }