PhpUnit fixes

This commit is contained in:
Dennis Eichhorn 2017-03-12 22:40:21 +01:00
parent 1bb6695fa1
commit be2ff1cd27
4 changed files with 18 additions and 11 deletions

View File

@ -50,11 +50,11 @@ class Installer extends InstallerAbstract
'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . 'clientmgmt_client` (
`clientmgmt_client_id` int(11) NOT NULL AUTO_INCREMENT,
`clientmgmt_client_no` int(11) NOT NULL,
`clientmgmt_client_no_reverse` int(11) NOT NULL,
`clientmgmt_client_no_reverse` varchar(25) DEFAULT NULL,
`clientmgmt_client_status` tinyint(2) NOT NULL,
`clientmgmt_client_type` tinyint(2) NOT NULL,
`clientmgmt_client_taxid` varchar(50) NOT NULL,
`clientmgmt_client_info` text NOT NULL,
`clientmgmt_client_taxid` varchar(50) DEFAULT NULL,
`clientmgmt_client_info` text DEFAULT NULL,
`clientmgmt_client_created_at` datetime NOT NULL,
`clientmgmt_client_account` int(11) NOT NULL,
PRIMARY KEY (`clientmgmt_client_id`),

View File

@ -128,7 +128,7 @@ class Client
public function setInfo(string $info) /* : void */
{
return $this->info;
$this->info = $info;
}
public function getCreatedAt() : \DateTime
@ -136,14 +136,14 @@ class Client
return $this->createdAt;
}
public function getProfile() : Account
public function getProfile() : Profile
{
return $this->profile;
}
public function setProfile(Account $account) /* : void */
public function setProfile(Profile $profile) /* : void */
{
$this->profile = $account;
$this->profile = $profile;
}
public function getFiles() : array

View File

@ -42,7 +42,7 @@ class ClientMapper extends DataMapperAbstract
'clientmgmt_client_type' => ['name' => 'clientmgmt_client_type', 'type' => 'int', 'internal' => 'type'],
'clientmgmt_client_taxid' => ['name' => 'clientmgmt_client_taxid', 'type' => 'string', 'internal' => 'taxId'],
'clientmgmt_client_info' => ['name' => 'clientmgmt_client_info', 'type' => 'string', 'internal' => 'info'],
'clientmgmt_client_at' => ['name' => 'clientmgmt_client_at', 'type' => 'DateTime', 'internal' => 'createdAt'],
'clientmgmt_client_created_at' => ['name' => 'clientmgmt_client_created_at', 'type' => 'DateTime', 'internal' => 'createdAt'],
'clientmgmt_client_account' => ['name' => 'clientmgmt_client_account', 'type' => 'int', 'internal' => 'profile'],
];
@ -68,7 +68,7 @@ class ClientMapper extends DataMapperAbstract
* @var string
* @since 1.0.0
*/
protected static $createdAt = 'clientmgmt_client_at';
protected static $createdAt = 'clientmgmt_client_created_at';
/**
* Has one relation.
@ -90,7 +90,7 @@ class ClientMapper extends DataMapperAbstract
'dst' => 'clientmgmt_client_media_dst',
'src' => 'clientmgmt_client_media_src',
],
'contact' => [
'contactElements' => [
'mapper' => ContactElementMapper::class,
'table' => 'clientmgmt_client_contactelement',
'dst' => 'clientmgmt_client_contactelement_dst',
@ -113,6 +113,11 @@ class ClientMapper extends DataMapperAbstract
{
try {
$objId = parent::create($obj, $relations);
if($objId === null || !is_scalar($objId)) {
return $objId;
}
$query = new Builder(self::$db);
$query->prefix(self::$db->getPrefix())

View File

@ -17,7 +17,9 @@
"description": "The buisness module.",
"directory": "ClientManagement",
"dependencies": {
"Admin" : "1.0.0"
"Admin" : "1.0.0",
"Profile" : "1.0.0",
"Media" : "1.0.0"
},
"providing": {
"Navigation": "*"