function ConvertTokensTest::testConvertTokensNull

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

Tests conversion of user tokens with a NULL value.

File

core/modules/user/tests/src/Unit/Plugin/migrate/process/ConvertTokensTest.php, line 34

Class

ConvertTokensTest
Tests the ConvertTokens plugin.

Namespace

Drupal\Tests\user\Unit\Plugin\migrate\process

Code

public function testConvertTokensNull() {
    $value = $this->plugin
        ->transform(NULL, $this->migrateExecutable, $this->row, 'destination_property');
    $this->assertEquals('', $value);
}

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