/** * @expectedException \Migration\Exception * @expectedExceptionMessage Record structure does not match provided Data * @return void */ public function testSetDataWithException() { $this->structure->expects($this->any())->method('getFields')->willReturn(['id', 'name']); $this->record->setStructure($this->structure); $this->record->setData(['id' => 11, 'wrongName' => 'item2']); }