fix tests

This commit is contained in:
Dennis Eichhorn 2023-09-29 02:38:01 +00:00
parent b72253d768
commit 0db5d7e2a5
7 changed files with 40 additions and 40 deletions

View File

@ -52,11 +52,11 @@ final class ContractAttributeMapper extends DataMapperFactory
public const OWNS_ONE = [
'type' => [
'mapper' => ContractAttributeTypeMapper::class,
'external' => 'contractmgmt_contract_attr_type',
'external' => 'contractmgmt_attr_type',
],
'value' => [
'mapper' => ContractAttributeValueMapper::class,
'external' => 'contractmgmt_contract_attr_value',
'external' => 'contractmgmt_attr_value',
],
];

View File

@ -37,10 +37,10 @@ final class ContractAttributeTypeL11nMapper extends DataMapperFactory
* @since 1.0.0
*/
public const COLUMNS = [
'contractmgmt_contract_attr_type_l11n_id' => ['name' => 'contractmgmt_contract_attr_type_l11n_id', 'type' => 'int', 'internal' => 'id'],
'contractmgmt_contract_attr_type_l11n_title' => ['name' => 'contractmgmt_contract_attr_type_l11n_title', 'type' => 'string', 'internal' => 'content', 'autocomplete' => true],
'contractmgmt_contract_attr_type_l11n_type' => ['name' => 'contractmgmt_contract_attr_type_l11n_type', 'type' => 'int', 'internal' => 'ref'],
'contractmgmt_contract_attr_type_l11n_lang' => ['name' => 'contractmgmt_contract_attr_type_l11n_lang', 'type' => 'string', 'internal' => 'language'],
'contractmgmt_attr_type_l11n_id' => ['name' => 'contractmgmt_attr_type_l11n_id', 'type' => 'int', 'internal' => 'id'],
'contractmgmt_attr_type_l11n_title' => ['name' => 'contractmgmt_attr_type_l11n_title', 'type' => 'string', 'internal' => 'content', 'autocomplete' => true],
'contractmgmt_attr_type_l11n_type' => ['name' => 'contractmgmt_attr_type_l11n_type', 'type' => 'int', 'internal' => 'ref'],
'contractmgmt_attr_type_l11n_lang' => ['name' => 'contractmgmt_attr_type_l11n_lang', 'type' => 'string', 'internal' => 'language'],
];
/**
@ -49,7 +49,7 @@ final class ContractAttributeTypeL11nMapper extends DataMapperFactory
* @var string
* @since 1.0.0
*/
public const TABLE = 'contractmgmt_contract_attr_type_l11n';
public const TABLE = 'contractmgmt_attr_type_l11n';
/**
* Primary field name.
@ -57,7 +57,7 @@ final class ContractAttributeTypeL11nMapper extends DataMapperFactory
* @var string
* @since 1.0.0
*/
public const PRIMARYFIELD = 'contractmgmt_contract_attr_type_l11n_id';
public const PRIMARYFIELD = 'contractmgmt_attr_type_l11n_id';
/**
* Model to use by the mapper.

View File

@ -37,13 +37,13 @@ final class ContractAttributeTypeMapper extends DataMapperFactory
* @since 1.0.0
*/
public const COLUMNS = [
'contractmgmt_contract_attr_type_id' => ['name' => 'contractmgmt_contract_attr_type_id', 'type' => 'int', 'internal' => 'id'],
'contractmgmt_contract_attr_type_name' => ['name' => 'contractmgmt_contract_attr_type_name', 'type' => 'string', 'internal' => 'name', 'autocomplete' => true],
'contractmgmt_contract_attr_type_datatype' => ['name' => 'contractmgmt_contract_attr_type_datatype', 'type' => 'int', 'internal' => 'datatype'],
'contractmgmt_contract_attr_type_fields' => ['name' => 'contractmgmt_contract_attr_type_fields', 'type' => 'int', 'internal' => 'fields'],
'contractmgmt_contract_attr_type_custom' => ['name' => 'contractmgmt_contract_attr_type_custom', 'type' => 'bool', 'internal' => 'custom'],
'contractmgmt_contract_attr_type_pattern' => ['name' => 'contractmgmt_contract_attr_type_pattern', 'type' => 'string', 'internal' => 'validationPattern'],
'contractmgmt_contract_attr_type_required' => ['name' => 'contractmgmt_contract_attr_type_required', 'type' => 'bool', 'internal' => 'isRequired'],
'contractmgmt_attr_type_id' => ['name' => 'contractmgmt_attr_type_id', 'type' => 'int', 'internal' => 'id'],
'contractmgmt_attr_type_name' => ['name' => 'contractmgmt_attr_type_name', 'type' => 'string', 'internal' => 'name', 'autocomplete' => true],
'contractmgmt_attr_type_datatype' => ['name' => 'contractmgmt_attr_type_datatype', 'type' => 'int', 'internal' => 'datatype'],
'contractmgmt_attr_type_fields' => ['name' => 'contractmgmt_attr_type_fields', 'type' => 'int', 'internal' => 'fields'],
'contractmgmt_attr_type_custom' => ['name' => 'contractmgmt_attr_type_custom', 'type' => 'bool', 'internal' => 'custom'],
'contractmgmt_attr_type_pattern' => ['name' => 'contractmgmt_attr_type_pattern', 'type' => 'string', 'internal' => 'validationPattern'],
'contractmgmt_attr_type_required' => ['name' => 'contractmgmt_attr_type_required', 'type' => 'bool', 'internal' => 'isRequired'],
];
/**
@ -55,8 +55,8 @@ final class ContractAttributeTypeMapper extends DataMapperFactory
public const HAS_MANY = [
'l11n' => [
'mapper' => ContractAttributeTypeL11nMapper::class,
'table' => 'contractmgmt_contract_attr_type_l11n',
'self' => 'contractmgmt_contract_attr_type_l11n_type',
'table' => 'contractmgmt_attr_type_l11n',
'self' => 'contractmgmt_attr_type_l11n_type',
'column' => 'content',
'external' => null,
],
@ -82,7 +82,7 @@ final class ContractAttributeTypeMapper extends DataMapperFactory
* @var string
* @since 1.0.0
*/
public const TABLE = 'contractmgmt_contract_attr_type';
public const TABLE = 'contractmgmt_attr_type';
/**
* Primary field name.
@ -90,5 +90,5 @@ final class ContractAttributeTypeMapper extends DataMapperFactory
* @var string
* @since 1.0.0
*/
public const PRIMARYFIELD = 'contractmgmt_contract_attr_type_id';
public const PRIMARYFIELD = 'contractmgmt_attr_type_id';
}

View File

@ -37,10 +37,10 @@ final class ContractAttributeValueL11nMapper extends DataMapperFactory
* @since 1.0.0
*/
public const COLUMNS = [
'contractmgmt_contract_attr_value_l11n_id' => ['name' => 'contractmgmt_contract_attr_value_l11n_id', 'type' => 'int', 'internal' => 'id'],
'contractmgmt_contract_attr_value_l11n_title' => ['name' => 'contractmgmt_contract_attr_value_l11n_title', 'type' => 'string', 'internal' => 'content', 'autocomplete' => true],
'contractmgmt_contract_attr_value_l11n_value' => ['name' => 'contractmgmt_contract_attr_value_l11n_value', 'type' => 'int', 'internal' => 'ref'],
'contractmgmt_contract_attr_value_l11n_lang' => ['name' => 'contractmgmt_contract_attr_value_l11n_lang', 'type' => 'string', 'internal' => 'language'],
'contractmgmt_attr_value_l11n_id' => ['name' => 'contractmgmt_attr_value_l11n_id', 'type' => 'int', 'internal' => 'id'],
'contractmgmt_attr_value_l11n_title' => ['name' => 'contractmgmt_attr_value_l11n_title', 'type' => 'string', 'internal' => 'content', 'autocomplete' => true],
'contractmgmt_attr_value_l11n_value' => ['name' => 'contractmgmt_attr_value_l11n_value', 'type' => 'int', 'internal' => 'ref'],
'contractmgmt_attr_value_l11n_lang' => ['name' => 'contractmgmt_attr_value_l11n_lang', 'type' => 'string', 'internal' => 'language'],
];
/**
@ -49,7 +49,7 @@ final class ContractAttributeValueL11nMapper extends DataMapperFactory
* @var string
* @since 1.0.0
*/
public const TABLE = 'contractmgmt_contract_attr_value_l11n';
public const TABLE = 'contractmgmt_attr_value_l11n';
/**
* Primary field name.
@ -57,7 +57,7 @@ final class ContractAttributeValueL11nMapper extends DataMapperFactory
* @var string
* @since 1.0.0
*/
public const PRIMARYFIELD = 'contractmgmt_contract_attr_value_l11n_id';
public const PRIMARYFIELD = 'contractmgmt_attr_value_l11n_id';
/**
* Model to use by the mapper.

View File

@ -37,15 +37,15 @@ final class ContractAttributeValueMapper extends DataMapperFactory
* @since 1.0.0
*/
public const COLUMNS = [
'contractmgmt_contract_attr_value_id' => ['name' => 'contractmgmt_contract_attr_value_id', 'type' => 'int', 'internal' => 'id'],
'contractmgmt_contract_attr_value_default' => ['name' => 'contractmgmt_contract_attr_value_default', 'type' => 'bool', 'internal' => 'isDefault'],
'contractmgmt_contract_attr_value_valueStr' => ['name' => 'contractmgmt_contract_attr_value_valueStr', 'type' => 'string', 'internal' => 'valueStr'],
'contractmgmt_contract_attr_value_valueInt' => ['name' => 'contractmgmt_contract_attr_value_valueInt', 'type' => 'int', 'internal' => 'valueInt'],
'contractmgmt_contract_attr_value_valueDec' => ['name' => 'contractmgmt_contract_attr_value_valueDec', 'type' => 'float', 'internal' => 'valueDec'],
'contractmgmt_contract_attr_value_valueDat' => ['name' => 'contractmgmt_contract_attr_value_valueDat', 'type' => 'DateTime', 'internal' => 'valueDat'],
'contractmgmt_contract_attr_value_unit' => ['name' => 'contractmgmt_contract_attr_value_unit', 'type' => 'string', 'internal' => 'unit'],
'contractmgmt_contract_attr_value_deptype' => ['name' => 'contractmgmt_contract_attr_value_deptype', 'type' => 'int', 'internal' => 'dependingAttributeType'],
'contractmgmt_contract_attr_value_depvalue' => ['name' => 'contractmgmt_contract_attr_value_depvalue', 'type' => 'int', 'internal' => 'dependingAttributeValue'],
'contractmgmt_attr_value_id' => ['name' => 'contractmgmt_attr_value_id', 'type' => 'int', 'internal' => 'id'],
'contractmgmt_attr_value_default' => ['name' => 'contractmgmt_attr_value_default', 'type' => 'bool', 'internal' => 'isDefault'],
'contractmgmt_attr_value_valueStr' => ['name' => 'contractmgmt_attr_value_valueStr', 'type' => 'string', 'internal' => 'valueStr'],
'contractmgmt_attr_value_valueInt' => ['name' => 'contractmgmt_attr_value_valueInt', 'type' => 'int', 'internal' => 'valueInt'],
'contractmgmt_attr_value_valueDec' => ['name' => 'contractmgmt_attr_value_valueDec', 'type' => 'float', 'internal' => 'valueDec'],
'contractmgmt_attr_value_valueDat' => ['name' => 'contractmgmt_attr_value_valueDat', 'type' => 'DateTime', 'internal' => 'valueDat'],
'contractmgmt_attr_value_unit' => ['name' => 'contractmgmt_attr_value_unit', 'type' => 'string', 'internal' => 'unit'],
'contractmgmt_attr_value_deptype' => ['name' => 'contractmgmt_attr_value_deptype', 'type' => 'int', 'internal' => 'dependingAttributeType'],
'contractmgmt_attr_value_depvalue' => ['name' => 'contractmgmt_attr_value_depvalue', 'type' => 'int', 'internal' => 'dependingAttributeValue'],
];
/**
@ -57,8 +57,8 @@ final class ContractAttributeValueMapper extends DataMapperFactory
public const HAS_MANY = [
'l11n' => [
'mapper' => ContractAttributeValueL11nMapper::class,
'table' => 'contractmgmt_contract_attr_value_l11n',
'self' => 'contractmgmt_contract_attr_value_l11n_value',
'table' => 'contractmgmt_attr_value_l11n',
'self' => 'contractmgmt_attr_value_l11n_value',
'external' => null,
],
];
@ -77,7 +77,7 @@ final class ContractAttributeValueMapper extends DataMapperFactory
* @var string
* @since 1.0.0
*/
public const TABLE = 'contractmgmt_contract_attr_value';
public const TABLE = 'contractmgmt_attr_value';
/**
* Primary field name.
@ -85,5 +85,5 @@ final class ContractAttributeValueMapper extends DataMapperFactory
* @var string
* @since 1.0.0
*/
public const PRIMARYFIELD = 'contractmgmt_contract_attr_value_id';
public const PRIMARYFIELD = 'contractmgmt_attr_value_id';
}

View File

@ -146,7 +146,7 @@ trait ApiControllerAttributeTrait
$request = new HttpRequest(new HttpUri(''));
$request->header->account = 1;
$request->setData('client', '1');
$request->setData('ref', '1');
$request->setData('value', '1');
$request->setData('type', '1');

View File

@ -99,7 +99,7 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase
TestUtils::setMember($this->typeModule, 'app', $this->app);
}
use ApiControllerAttributeTrait;
use ApiControllerContractTypeTrait;
use ApiControllerContractTrait;
use ApiControllerAttributeTrait;
}