public function CheckRequirementsTest::testException in Drupal 9
Same name and namespace in other branches
- 8 core/modules/migrate/tests/src/Unit/Plugin/migrate/destination/CheckRequirementsTest.php \Drupal\Tests\migrate\Unit\Plugin\migrate\destination\CheckRequirementsTest::testException()
Tests the check requirements exception message.
File
- core/
modules/ migrate/ tests/ src/ Unit/ Plugin/ migrate/ destination/ CheckRequirementsTest.php, line 22
Class
- CheckRequirementsTest
- Tests check requirements exception on DestinationBase.
Namespace
Drupal\Tests\migrate\Unit\Plugin\migrate\destinationCode
public function testException() {
$destination = new Config([
'config_name' => 'test',
], 'test', [], $this
->prophesize(MigrationInterface::class)
->reveal(), $this
->prophesize(ConfigFactoryInterface::class)
->reveal(), $this
->prophesize(LanguageManagerInterface::class)
->reveal());
$this
->expectException(RequirementsException::class);
$this
->expectExceptionMessage("Destination plugin 'test' did not meet the requirements");
$destination
->checkRequirements();
}