Refactor
This commit is contained in:
parent
9aaca6b3b5
commit
514f38b93c
1 changed files with 4 additions and 2 deletions
|
@ -6,6 +6,8 @@ use Drupal\Tests\BrowserTestBase;
|
||||||
use Drupal\Tests\node\Traits\NodeCreationTrait;
|
use Drupal\Tests\node\Traits\NodeCreationTrait;
|
||||||
use Drupal\Tests\token\Functional\TokenTestTrait;
|
use Drupal\Tests\token\Functional\TokenTestTrait;
|
||||||
use Drupal\node\NodeInterface;
|
use Drupal\node\NodeInterface;
|
||||||
|
use Drupal\opd_podcast\Episode;
|
||||||
|
use Drupal\opd_podcast\Guest;
|
||||||
use Drupal\taxonomy\Entity\Term;
|
use Drupal\taxonomy\Entity\Term;
|
||||||
use Drupal\taxonomy\TermInterface;
|
use Drupal\taxonomy\TermInterface;
|
||||||
|
|
||||||
|
@ -58,7 +60,7 @@ class PodcastTokenTest extends BrowserTestBase {
|
||||||
array: $guestNames,
|
array: $guestNames,
|
||||||
callback: fn (string $guestName): TermInterface => Term::create([
|
callback: fn (string $guestName): TermInterface => Term::create([
|
||||||
'name' => $guestName,
|
'name' => $guestName,
|
||||||
'vid' => 'podcast_guest',
|
'vid' => Guest::TERM_TYPE,
|
||||||
]),
|
]),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -70,7 +72,7 @@ class PodcastTokenTest extends BrowserTestBase {
|
||||||
return $this->createNode([
|
return $this->createNode([
|
||||||
'field_podcast_guests' => $this->createGuestTerms($guestNames),
|
'field_podcast_guests' => $this->createGuestTerms($guestNames),
|
||||||
'title' => '::title::',
|
'title' => '::title::',
|
||||||
'type' => 'podcast_episode',
|
'type' => Episode::NODE_TYPE,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue