Test fixes

This commit is contained in:
Dennis Eichhorn 2016-01-24 15:05:16 +01:00
parent f3cf170d88
commit a5b9f4fdf7
2 changed files with 23 additions and 26 deletions

View File

@ -16,7 +16,6 @@
namespace Modules\Media\Models;
/**
* Media class.
*
@ -39,6 +38,9 @@ class Collection extends Media
*/
private $sources = [];
protected $extension = 'collection';
protected $versioned = false;
/**
* Constructor.
*
@ -91,4 +93,12 @@ class Collection extends Media
{
return $this->sources;
}
public function setExtension(string $extension)
{
}
public function setVersioned(bool $versioned)
{
}
}

View File

@ -139,19 +139,6 @@ class Media
return $this->id;
}
/**
* @param int $id Id
*
* @return void
*
* @since 1.0.0
* @author Dennis Eichhorn <d.eichhorn@oms.com>
*/
public function setId(int $id)
{
$this->id = $id;
}
/**
* @return int
*
@ -171,7 +158,7 @@ class Media
*/
public function getCreatedAt() : \DateTime
{
return $this->createdAt;
return $this->createdAt ?? new \DateTime('now');
}
/**
@ -229,6 +216,17 @@ class Media
return $this->size;
}
/**
* @return bool
*
* @since 1.0.0
* @author Dennis Eichhorn <d.eichhorn@oms.com>
*/
public function isVersioned() : bool
{
return $this->versioned;
}
/**
* @param int $createdBy Creator
*
@ -332,15 +330,4 @@ class Media
{
$this->versioned = $versioned;
}
/**
* @return bool
*
* @since 1.0.0
* @author Dennis Eichhorn <d.eichhorn@oms.com>
*/
public function getVersioned() : bool
{
return $this->versioned;
}
}