plugin->rewrite($function_call, $this->target); $this->assertInstanceOf('\Pharborist\Objects\ObjectMethodCallNode', $rewritten); $this->assertEquals('\Drupal::service(\'user.tempstore\')->set("baz", array())', $rewritten->getText()); } public function testRewriteSessionID() { $function_call = Parser::parseExpression('ctools_object_cache_set("foo", "baz", array(), "SESSION_ID")'); $rewritten = $this->plugin->rewrite($function_call, $this->target); $this->assertInstanceOf('\Pharborist\Objects\ObjectMethodCallNode', $rewritten); $this->assertEquals('\Drupal::service(\'user.tempstore\')->set("baz", array())', $rewritten->getText()); } }