Extract a Date class for event dates
This commit is contained in:
parent
c2dd8a1a07
commit
c2cd2164f5
3 changed files with 27 additions and 5 deletions
|
@ -5,6 +5,7 @@ declare(strict_types=1);
|
|||
namespace Drupal\opd_presentations\Functional;
|
||||
|
||||
use Drupal\Tests\opd_presentations\Traits\PresentationCreationTrait;
|
||||
use Drupal\opd_presentations\Date;
|
||||
use weitzman\DrupalTestTraits\ExistingSiteBase;
|
||||
|
||||
final class PresentationTest extends ExistingSiteBase {
|
||||
|
@ -15,17 +16,17 @@ final class PresentationTest extends ExistingSiteBase {
|
|||
$presentation = $this->createPresentation(
|
||||
events: [
|
||||
$this->createEvent(
|
||||
eventDate: 'now',
|
||||
eventDate: Date::fromString('now'),
|
||||
eventName: 'PHP South West',
|
||||
),
|
||||
|
||||
$this->createEvent(
|
||||
eventDate: 'yesterday',
|
||||
eventDate: Date::fromString('yesterday'),
|
||||
eventName: 'DrupalCon Lille',
|
||||
),
|
||||
|
||||
$this->createEvent(
|
||||
eventDate: 'tomorrow',
|
||||
eventDate: Date::fromString('tomorrow'),
|
||||
eventName: 'PHP Oxford',
|
||||
),
|
||||
],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue