plugin->rewrite($function_call, $this->target); $this->assertInstanceOf('\Pharborist\Objects\ObjectMethodCallNode', $rewritten); $this->assertEquals('$account->save()', $rewritten->getText()); } public function testRewriteWithEditArray() { $function_call = Parser::parseExpression('user_save($account, array())'); $this->assertNull($this->plugin->rewrite($function_call, $this->target)); } public function testRewriteWithEditArrayAndCategory() { $function_call = Parser::parseExpression('user_save($account, array(), "Foo")'); $this->assertNull($this->plugin->rewrite($function_call, $this->target)); } }