Test fixes (working)

This commit is contained in:
Dennis Eichhorn 2017-03-13 15:15:52 +01:00
parent 20caea6f6e
commit adf58d3ee8
3 changed files with 10 additions and 7 deletions

View File

@ -47,13 +47,13 @@ class Installer extends InstallerAbstract
$dbPool->get('core')->con->prepare( $dbPool->get('core')->con->prepare(
'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . 'media` ( 'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . 'media` (
`media_id` int(11) NOT NULL AUTO_INCREMENT, `media_id` int(11) NOT NULL AUTO_INCREMENT,
`media_name` varchar(100) NOT NULL, `media_name` varchar(100) DEFAULT NULL,
`media_versioned` tinyint(1) NOT NULL, `media_versioned` tinyint(1) NOT NULL,
`media_file` varchar(255) NOT NULL, `media_file` varchar(255) NOT NULL,
`media_extension` varchar(10) NULL, `media_extension` varchar(10) DEFAULT NULL,
`media_collection` tinyint(1) NULL, `media_collection` tinyint(1) DEFAULT NULL,
`media_description` varchar(255) NULL, `media_description` varchar(255) DEFAULT NULL,
`media_size` int(11) NULL, `media_size` int(11) DEFAULT NULL,
`media_created_by` int(11) DEFAULT NULL, `media_created_by` int(11) DEFAULT NULL,
`media_created_at` datetime DEFAULT NULL, `media_created_at` datetime DEFAULT NULL,
PRIMARY KEY (`media_id`), PRIMARY KEY (`media_id`),

View File

@ -39,6 +39,7 @@ class Collection extends Media
private $sources = []; private $sources = [];
protected $extension = 'collection'; protected $extension = 'collection';
protected $versioned = false; protected $versioned = false;
/** /**
@ -49,6 +50,7 @@ class Collection extends Media
*/ */
public function __construct() public function __construct()
{ {
$this->createdAt = new \DateTime();
} }
/** /**

View File

@ -127,6 +127,7 @@ class Media
*/ */
public function __construct() public function __construct()
{ {
$this->createdAt = new \DateTime();
} }
/** /**
@ -229,14 +230,14 @@ class Media
} }
/** /**
* @param int $createdBy Creator * @param mixed $createdBy Creator
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
* @author Dennis Eichhorn <d.eichhorn@oms.com> * @author Dennis Eichhorn <d.eichhorn@oms.com>
*/ */
public function setCreatedBy(int $createdBy) public function setCreatedBy($createdBy)
{ {
$this->createdBy = $createdBy; $this->createdBy = $createdBy;
} }