Craft\ImportServiceTest::testRowUniqueReplaceOrDeleteShouldLogErrorWhenFieldValueEmpty PHP Method

testRowUniqueReplaceOrDeleteShouldLogErrorWhenFieldValueEmpty() public method

    public function testRowUniqueReplaceOrDeleteShouldLogErrorWhenFieldValueEmpty()
    {
        $row = 1;
        $historyId = 2;
        $settings = array('user' => 1, 'map' => array('field1' => 'field1', 'field2' => 'field2'), 'type' => 'TypeExists', 'unique' => array('field1' => 1, 'field2' => 0), 'history' => $historyId);
        $data = array('settings1' => '', 'settings2' => '');
        $fields = array_combine($settings['map'], $data);
        $mockEntry = $this->getMockEntry();
        $mockCriteria = $this->getMockCriteria();
        $mockImportEntryService = $this->setMockImportEntryService($settings, $mockEntry, $fields);
        $mockImportEntryService->expects($this->exactly(1))->method('setCriteria')->with($settings)->willReturn($mockCriteria);
        $this->setMockImportHistoryService($historyId, $row, $this->isType('array'));
        $service = new ImportService();
        $service->row($row, $data, $settings);
    }