public function TestGetOneBookWithBadKeyThrowException() { $fetch = new Books($this->book->id); $fetch->setKey('foo'); try { $this->assertEqual('John Doe', $fetch->authors->name); $this->fail('Must throw a MormSqlException.'); } catch (MormSqlException $e) { $this->pass(); } }