Craft\ImportServiceTest::testRowShouldLogErrorWhenSaveFails PHP Method

testRowShouldLogErrorWhenSaveFails() public method

    public function testRowShouldLogErrorWhenSaveFails()
    {
        $row = 1;
        $historyId = 2;
        $settings = array('map' => array(), 'type' => 'TypeExists', 'unique' => false, 'history' => $historyId);
        $data = array();
        $fields = array_combine($settings['map'], $data);
        $mockEntry = $this->getMockEntry();
        $mockEntry->expects($this->exactly(1))->method('getErrors')->willReturn(array());
        $mockEntry->expects($this->exactly(1))->method('setContentFromPost')->with($fields);
        $this->setMockImportEntryService($settings, $mockEntry, $fields, false);
        $this->setMockImportHistoryService($historyId, $row, $this->isType('array'));
        $service = new ImportService();
        $service->row($row, $data, $settings);
    }