public function UserRoleTest::testPrepareValueEmptyFeedWithAutoCreateRole in Feeds 8.3
Tests prepareValue() with passing a space as value.
@covers ::prepareValue @covers ::findEntity @covers ::createRole
File
- tests/
src/ Unit/ Feeds/ Target/ UserRoleTest.php, line 204
Class
- UserRoleTest
- @coversDefaultClass \Drupal\feeds\Feeds\Target\UserRole @group feeds
Namespace
Drupal\Tests\feeds\Unit\Feeds\TargetCode
public function testPrepareValueEmptyFeedWithAutoCreateRole() {
$target_plugin = $this
->createTargetPluginInstance([
'autocreate' => TRUE,
]);
$method = $this
->getProtectedClosure($target_plugin, 'prepareValue');
$values = [
'target_id' => ' ',
];
$this
->expectException(EmptyFeedException::class);
$method(0, $values);
}