NerdsAndCompany\Schematic\Services\UsersTest::testUsersServiceImportWithImportError PHP Method

testUsersServiceImportWithImportError() public method

Test users service import.
    public function testUsersServiceImportWithImportError()
    {
        $mockFieldsService = $this->getMockFieldServiceForImport(false);
        $mockSchematicFieldsService = $this->getMockSchematicFieldServiceForImport(true);
        $this->setComponent(Craft::app(), 'fields', $mockFieldsService);
        $this->setComponent(Craft::app(), 'schematic_fields', $mockSchematicFieldsService);
        $import = $this->schematicUsersService->import([]);
        $this->assertTrue($import instanceof Result);
        $this->assertTrue($import->hasErrors('errors'));
    }