Skip to content
Snippets Groups Projects
Unverified Commit 32e999c4 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3097822 by mondrake, Lendude: Drupal\migrate_drupal\Tests\StubTestTrait...

Issue #3097822 by mondrake, Lendude: Drupal\migrate_drupal\Tests\StubTestTrait is not compatible with PHPUnit 8

(cherry picked from commit a5876a27)
parent 5d64d72c
No related branches found
No related tags found
9 merge requests!1445Issue #2920039: Views' User Name exposed group filter validation,!1298Issue #3240993: Let layout builder render inline block translations,!774Issue #3174569: Example node template file name is incorrect,!497Issue #2463967: Use .user.ini file for PHP settings,!433Resolve #3163663 "Too many open files",!233Resolve #2693787 "Taxonomy term name",!133Resolve #2666286 "Clean up menuui",!112Resolve #3187004 "Drupaldatetime serialization issue",!53Resolve #3181870: Correct typo "the the" in "core/classList" deprecation message.
...@@ -35,7 +35,7 @@ protected function setUp() { ...@@ -35,7 +35,7 @@ protected function setUp() {
public function testStubFailure() { public function testStubFailure() {
$message = 'Expected MigrateException thrown when no bundles exist.'; $message = 'Expected MigrateException thrown when no bundles exist.';
try { try {
$this->createStub('block_content'); $this->createEntityStub('block_content');
$this->fail($message); $this->fail($message);
} }
catch (MigrateException $e) { catch (MigrateException $e) {
......
...@@ -17,7 +17,7 @@ trait StubTestTrait { ...@@ -17,7 +17,7 @@ trait StubTestTrait {
* The entity type we are stubbing. * The entity type we are stubbing.
*/ */
protected function performStubTest($entity_type_id) { protected function performStubTest($entity_type_id) {
$entity_id = $this->createStub($entity_type_id); $entity_id = $this->createEntityStub($entity_type_id);
$this->assertNotEmpty($entity_id, 'Stub successfully created'); $this->assertNotEmpty($entity_id, 'Stub successfully created');
if ($entity_id) { if ($entity_id) {
$violations = $this->validateStub($entity_type_id, $entity_id); $violations = $this->validateStub($entity_type_id, $entity_id);
...@@ -38,7 +38,7 @@ protected function performStubTest($entity_type_id) { ...@@ -38,7 +38,7 @@ protected function performStubTest($entity_type_id) {
* @return int * @return int
* ID of the created entity. * ID of the created entity.
*/ */
protected function createStub($entity_type_id) { protected function createEntityStub($entity_type_id) {
// Create a dummy migration to pass to the destination plugin. // Create a dummy migration to pass to the destination plugin.
$definition = [ $definition = [
'migration_tags' => ['Stub test'], 'migration_tags' => ['Stub test'],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment