Further modules included.
[yaffs-website] / web / modules / contrib / drupalmoduleupgrader / tests / src / Unit / Plugin / DMU / Converter / Functions / FieldUpdateInstanceTest.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\FieldUpdateInstance
10  */
11 class FieldUpdateInstanceTest extends FunctionCallModifierTestBase {
12
13   public function testRewrite() {
14     $function_call = Parser::parseExpression('field_update_instance($instance)');
15     $rewritten = $this->plugin->rewrite($function_call, $this->target);
16     $this->assertInstanceOf('\Pharborist\Objects\ObjectMethodCallNode', $rewritten);
17     $this->assertEquals('$instance->save()', $rewritten->getText());
18   }
19
20 }