<?php declare(strict_types=1);

namespace Newland\Toubiz\Sync\Neos\Tests\Unit\Importer\Mock;

use Newland\Toubiz\Api\ObjectAdapter\EventDateAdapterInterface;

class EventDateAdapterMock implements EventDateAdapterInterface
{

    public $properties = [];

    public function __construct(array $properties)
    {
        $this->properties = $properties;
    }

    public function getBeginsAt()
    {
        return $this->properties['beginsAt'] ?? new \DateTime();
    }

    public function getEndsAt()
    {
        return $this->properties['endsAt'] ?? new \DateTime();
    }

    public function getNote()
    {
        return $this->properties['note'] ?? '';
    }

    public function getDetailUri()
    {
        return $this->properties['detailUri'] ?? null;
    }

    public function getExternalId(): string
    {
        return $this->properties['externalId'] ?? '';
    }
}