Refactor
This commit is contained in:
parent
3c4b053e0e
commit
4715d02ae0
2 changed files with 11 additions and 12 deletions
|
|
@ -4,7 +4,6 @@ declare(strict_types=1);
|
|||
|
||||
namespace Drupal\opd_presentations\Functional\Entity;
|
||||
|
||||
use Drupal\Core\Datetime\DrupalDateTime;
|
||||
use Drupal\Tests\opd_presentations\Traits\PresentationCreationTrait;
|
||||
use weitzman\DrupalTestTraits\ExistingSiteBase;
|
||||
|
||||
|
|
@ -15,9 +14,9 @@ final class PresentationTest extends ExistingSiteBase {
|
|||
public function test_only_past_events_are_returned(): void {
|
||||
$presentation = $this->createPresentation(
|
||||
events: [
|
||||
$this->createEvent(['field_date' => (new DrupalDateTime('now'))->getTimestamp()]),
|
||||
$this->createEvent(['field_date' => (new DrupalDateTime('yesterday'))->getTimestamp()]),
|
||||
$this->createEvent(['field_date' => (new DrupalDateTime('tomorrow'))->getTimestamp()]),
|
||||
$this->createEvent(eventDate: 'now'),
|
||||
$this->createEvent(eventDate: 'yesterday'),
|
||||
$this->createEvent(eventDate: 'tomorrow'),
|
||||
],
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue