Ensure that method names are in a consistent format

This commit is contained in:
Oliver Davies 2020-12-17 23:23:00 +00:00
parent 280a381c68
commit 864c2429a5
2 changed files with 12 additions and 4 deletions

View file

@ -1,5 +1,7 @@
<?php
// phpcs:disable Drupal.Commenting.DocComment, Drupal.NamingConventions.ValidFunctionName
namespace Drupal\Tests\opdavies_talks\Kernel;
use Carbon\Carbon;
@ -7,7 +9,8 @@ use Drupal\paragraphs\ParagraphInterface;
final class EventsAreReorderedByDateTest extends TalksTestBase {
public function testCreatingNode(): void {
/** @test */
public function the_events_are_reordered_when_a_talk_node_is_created(): void {
$events = [
$this->createEvent([
'field_date' => Carbon::today()->addWeeks(2),
@ -50,7 +53,8 @@ final class EventsAreReorderedByDateTest extends TalksTestBase {
);
}
public function testUpdatingNode(): void {
/** @test */
public function the_events_are_reordered_when_a_talk_node_is_updated(): void {
$events = [
$this->createEvent([
'field_date' => Carbon::today()->addWeeks(2),

View file

@ -1,5 +1,7 @@
<?php
// phpcs:disable Drupal.Commenting.DocComment, Drupal.NamingConventions.ValidFunctionName
namespace Drupal\Tests\opdavies_talks\Kernel;
use Carbon\Carbon;
@ -7,7 +9,8 @@ use Drupal\datetime\Plugin\Field\FieldType\DateTimeItemInterface;
final class UpdatesTalkCreatedDateTest extends TalksTestBase {
public function testCreatingNode(): void {
/** @test */
public function the_date_is_updated_when_a_talk_node_is_created(): void {
$eventDate = Carbon::today()->addWeek();
$eventDateFormat = $eventDate
->format(DateTimeItemInterface::DATE_STORAGE_FORMAT);
@ -22,7 +25,8 @@ final class UpdatesTalkCreatedDateTest extends TalksTestBase {
$this->assertEqual($eventDateTimestamp, $talk->getCreatedTime());
}
public function testUpdatingNode(): void {
/** @test */
public function the_date_is_updated_when_a_talk_node_is_updated(): void {
$talk = $this->createTalk();
$originalCreatedTime = $talk->getCreatedTime();