All test method should have a void return type
This commit is contained in:
parent
8591a0f846
commit
280a381c68
|
@ -7,7 +7,7 @@ use Drupal\paragraphs\ParagraphInterface;
|
|||
|
||||
final class EventsAreReorderedByDateTest extends TalksTestBase {
|
||||
|
||||
public function testCreatingNode() {
|
||||
public function testCreatingNode(): void {
|
||||
$events = [
|
||||
$this->createEvent([
|
||||
'field_date' => Carbon::today()->addWeeks(2),
|
||||
|
@ -50,7 +50,7 @@ final class EventsAreReorderedByDateTest extends TalksTestBase {
|
|||
);
|
||||
}
|
||||
|
||||
public function testUpdatingNode() {
|
||||
public function testUpdatingNode(): void {
|
||||
$events = [
|
||||
$this->createEvent([
|
||||
'field_date' => Carbon::today()->addWeeks(2),
|
||||
|
|
|
@ -17,7 +17,7 @@ final class TalkRepositoryTest extends TalksTestBase {
|
|||
private TalkRepository $talkRepository;
|
||||
|
||||
/** @test */
|
||||
public function get_all_talks() {
|
||||
public function get_all_talks(): void {
|
||||
$this->createTalk(['title' => 'TDD - Test Driven Drupal']);
|
||||
$this->createTalk(['title' => 'Taking Flight with Tailwind CSS']);
|
||||
$this->createTalk(['title' => 'Upgrading to Drupal 9']);
|
||||
|
@ -36,7 +36,7 @@ final class TalkRepositoryTest extends TalksTestBase {
|
|||
}
|
||||
|
||||
/** @test */
|
||||
public function get_all_published_talks() {
|
||||
public function get_all_published_talks(): void {
|
||||
$this->createTalk([
|
||||
'title' => 'TDD - Test Driven Drupal',
|
||||
'status' => NodeInterface::PUBLISHED,
|
||||
|
@ -54,7 +54,7 @@ final class TalkRepositoryTest extends TalksTestBase {
|
|||
}
|
||||
|
||||
/** @test */
|
||||
public function it_only_returns_talk_nodes() {
|
||||
public function it_only_returns_talk_nodes(): void {
|
||||
$this->createNode(['type' => 'page']);
|
||||
|
||||
$talks = $this->talkRepository->getAll();
|
||||
|
|
|
@ -18,7 +18,7 @@ final class TalksPageSortTest extends TalksTestBase {
|
|||
/**
|
||||
* @test
|
||||
*/
|
||||
public function upcoming_talks_are_shown_first_followed_by_past_talks_and_ordered_by_distance() {
|
||||
public function upcoming_talks_are_shown_first_followed_by_past_talks_and_ordered_by_distance(): void {
|
||||
$this->createTalk([
|
||||
'field_event_date' => Carbon::today()->addDays(4)->getTimestamp(),
|
||||
]);
|
||||
|
|
|
@ -7,7 +7,7 @@ use Drupal\datetime\Plugin\Field\FieldType\DateTimeItemInterface;
|
|||
|
||||
final class UpdatesTalkCreatedDateTest extends TalksTestBase {
|
||||
|
||||
public function testCreatingNode() {
|
||||
public function testCreatingNode(): void {
|
||||
$eventDate = Carbon::today()->addWeek();
|
||||
$eventDateFormat = $eventDate
|
||||
->format(DateTimeItemInterface::DATE_STORAGE_FORMAT);
|
||||
|
@ -22,7 +22,7 @@ final class UpdatesTalkCreatedDateTest extends TalksTestBase {
|
|||
$this->assertEqual($eventDateTimestamp, $talk->getCreatedTime());
|
||||
}
|
||||
|
||||
public function testUpdatingNode() {
|
||||
public function testUpdatingNode(): void {
|
||||
$talk = $this->createTalk();
|
||||
$originalCreatedTime = $talk->getCreatedTime();
|
||||
|
||||
|
|
Loading…
Reference in a new issue