mirror of
https://github.com/Karaka-Management/oms-ProjectManagement.git
synced 2026-01-24 21:38:43 +00:00
fix tests
This commit is contained in:
parent
4eec1a5ccf
commit
4ce1dac792
|
|
@ -24,4 +24,15 @@ namespace Modules\ProjectManagement\Models;
|
|||
*/
|
||||
final class NullProject extends Project
|
||||
{
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param int $id Model id
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function __construct(int $id = 0)
|
||||
{
|
||||
$this->id = $id;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ class Project
|
|||
* @var int
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private int $id = 0;
|
||||
protected int $id = 0;
|
||||
|
||||
/**
|
||||
* Start date.
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ class ProjectTest extends \PHPUnit\Framework\TestCase
|
|||
$project = new Project();
|
||||
|
||||
self::assertEquals(0, $project->getId());
|
||||
self::assertInstanceOf('\Modules\Calendar\Models\Calendar', $project->getCalendar());
|
||||
self::assertInstanceOf('\Modules\Calendar\Models\Calendar', $project->calendar);
|
||||
self::assertEquals((new \DateTime('now'))->format('Y-m-d'), $project->createdAt->format('Y-m-d'));
|
||||
self::assertEquals((new \DateTime('now'))->format('Y-m-d'), $project->getStart()->format('Y-m-d'));
|
||||
self::assertEquals((new \DateTime('now'))->modify('+1 month')->format('Y-m-d'), $project->getEnd()->format('Y-m-d'));
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user