function DataConvertTest::testInvalidValueException

Test the behavior if nonsense context values is set.

@covers ::execute

File

tests/src/Unit/Integration/RulesAction/DataConvertTest.php, line 106

Class

DataConvertTest
@coversDefaultClass \Drupal\rules\Plugin\RulesAction\DataConvert @group RulesAction

Namespace

Drupal\Tests\rules\Unit\Integration\RulesAction

Code

public function testInvalidValueException() {
    // Set the expected exception class and message.
    $this->expectException(InvalidArgumentException::class);
    $this->expectExceptionMessage('Only scalar values are supported.');
    $this->executeAction([
        'some-array',
    ], 'integer');
}