function ValidationResultTest::testCreateErrorResultException

@covers ::createError

@dataProvider providerCreateExceptions

Parameters

string[] $messages: The error messages of the validation result.

string $expected_exception_message: The expected exception message.

File

core/modules/package_manager/tests/src/Unit/ValidationResultTest.php, line 88

Class

ValidationResultTest
@coversDefaultClass \Drupal\package_manager\ValidationResult @group package_manager @internal

Namespace

Drupal\Tests\package_manager\Unit

Code

public function testCreateErrorResultException(array $messages, string $expected_exception_message) : void {
    $this->expectException(\InvalidArgumentException::class);
    $this->expectExceptionMessage($expected_exception_message);
    ValidationResult::createError($messages, NULL);
}

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