find(Filter::isFunctionCall('variable_set'))->get(0); $rewritten = $this->plugin->rewrite($function_call, $this->target); $this->assertNull($rewritten); $this->assertSame($expected, $snippet->getText()); } public function testForeignStringKey() { $original = <<<'END' find(Filter::isFunctionCall('variable_set'))->get(0); $rewritten = $this->plugin->rewrite($function_call, $this->target); $this->assertNull($rewritten); $this->assertSame($expected, $snippet->getText()); } public function testStringKey() { $function_call = Parser::parseExpression('variable_set("foo_wambooli", 30)'); $rewritten = $this->plugin->rewrite($function_call, $this->target); $this->assertInstanceOf('\Pharborist\Objects\ObjectMethodCallNode', $rewritten); $this->assertEquals('\Drupal::configFactory()->getEditable(\'foo.settings\')->set("foo_wambooli", 30)->save()', $rewritten->getText()); } }