function ExplodeTest::testExplodeWithNonString

Same name and namespace in other branches
  1. 9 core/modules/migrate/tests/src/Unit/process/ExplodeTest.php \Drupal\Tests\migrate\Unit\process\ExplodeTest::testExplodeWithNonString()
  2. 8.9.x core/modules/migrate/tests/src/Unit/process/ExplodeTest.php \Drupal\Tests\migrate\Unit\process\ExplodeTest::testExplodeWithNonString()
  3. 10 core/modules/migrate/tests/src/Unit/process/ExplodeTest.php \Drupal\Tests\migrate\Unit\process\ExplodeTest::testExplodeWithNonString()

Tests explode fails properly on non-strings.

File

core/modules/migrate/tests/src/Unit/process/ExplodeTest.php, line 60

Class

ExplodeTest
Tests the Explode process plugin.

Namespace

Drupal\Tests\migrate\Unit\process

Code

public function testExplodeWithNonString() : void {
    $this->expectException(MigrateException::class);
    $this->expectExceptionMessage('is not a string');
    $this->plugin
        ->transform([
        'foo',
    ], $this->migrateExecutable, $this->row, 'destination_property');
}

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