function CallbackTest::testCallbackExceptions

Same name in other branches
  1. 9 core/modules/migrate/tests/src/Unit/process/CallbackTest.php \Drupal\Tests\migrate\Unit\process\CallbackTest::testCallbackExceptions()
  2. 10 core/modules/migrate/tests/src/Unit/process/CallbackTest.php \Drupal\Tests\migrate\Unit\process\CallbackTest::testCallbackExceptions()
  3. 11.x core/modules/migrate/tests/src/Unit/process/CallbackTest.php \Drupal\Tests\migrate\Unit\process\CallbackTest::testCallbackExceptions()

Test callback exceptions.

@dataProvider providerCallbackExceptions

File

core/modules/migrate/tests/src/Unit/process/CallbackTest.php, line 41

Class

CallbackTest
Tests the callback process plugin.

Namespace

Drupal\Tests\migrate\Unit\process

Code

public function testCallbackExceptions($message, $configuration) {
    $this->expectException(\InvalidArgumentException::class);
    $this->expectExceptionMessage($message);
    $this->plugin = new Callback($configuration, 'map', []);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.