/** * @expectedException \Illuminate\Database\QueryException * @expectedExceptionCode 22P02 */ public function testCreateNewDataWithContentsAndMetadataNotMatchingIndex() { $this->logger->info("testCreateNewDataWithContentsAndMetadataNotMatchingIndex ..."); $data = new Object(); $data->type = 'blog-post'; $data->save(); $data->setJsonAttribute('data', 'foo', 'bar'); $data->setJsonAttribute('metadata', 'created_at', 'toto'); $data->save(); }