array($this, 'callback1'), 'newMethod2' => array($this, 'callback2'), ); phpQuery::extend('phpQueryObject', $newMethods); $doc = phpQuery::newDocumentXML("
"); $this->assertTrue($doc->newMethod1() == $doc, '$doc->newMethod1 == $doc'); $this->assertTrue($doc->newMethod2() == "callback2", '$doc->newMethod1 == "callback2"'); } }