Further modules included.
[yaffs-website] / web / modules / contrib / drupalmoduleupgrader / tests / src / Unit / Plugin / DMU / Converter / Functions / DisableTest.php
1 <?php
2
3 namespace Drupal\Tests\drupalmoduleupgrader\Unit\Plugin\DMU\Converter\Functions;
4
5 use Pharborist\Parser;
6
7 /**
8  * @group DMU.Converter.Functions
9  * @covers \Drupal\drupalmoduleupgrader\Plugin\DMU\Converter\Functions\Disable
10  *
11  * Currently, the Disable plugin behaves identically for every function it
12  * handles (unconditionally returns NULL), so I'm only testing one function.
13  */
14 class DisableTest extends FunctionCallModifierTestBase {
15
16   public function setUp() {
17     parent::setUp();
18     $this->plugin = $this->getPlugin([], [ 'function' => 'field_create_field' ]);
19   }
20
21   public function testRewrite() {
22     $function_call = Parser::parseExpression('field_create_field($field)');
23     $this->assertNull($this->plugin->rewrite($function_call, $this->target));
24   }
25
26 }