public function BlockVisibilityTest::testTransformPhpEnabled in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/block/tests/src/Unit/Plugin/migrate/process/BlockVisibilityTest.php \Drupal\Tests\block\Unit\Plugin\migrate\process\BlockVisibilityTest::testTransformPhpEnabled()
@covers ::transform
File
- core/
modules/ block/ tests/ src/ Unit/ Plugin/ migrate/ process/ BlockVisibilityTest.php, line 71 - Contains \Drupal\Tests\block\Unit\Plugin\migrate\process\BlockVisibilityTest.
Class
- BlockVisibilityTest
- Tests the block_visibility process plugin.
Namespace
Drupal\Tests\block\Unit\Plugin\migrate\processCode
public function testTransformPhpEnabled() {
$this->moduleHandler
->moduleExists('php')
->willReturn(TRUE);
$visibility = $this->plugin
->transform([
2,
'<?php',
[],
], $this->migrateExecutable, $this->row, 'destinationproperty');
$this
->assertSame('php', $visibility['php']['id']);
$this
->assertFalse($visibility['php']['negate']);
$this
->assertSame('<?php', $visibility['php']['php']);
}