/** * Prepares the environment before running a test. */ protected function setUp() { parent::setUp(); $this->GadgetServer = new GadgetServer(); // prevent polution from other test cases + make sure we're not testing // a cached result $_GET = array('nocache' => 1); $_POST = array(); $GadgetContext = new GadgetContext('GADGET'); $GadgetContext->setUrl('http://test.chabotc.com/testGadget.xml'); $this->gadget = $this->GadgetServer->processGadget($GadgetContext); }
/** * Tests GadgetContext->setUrl() */ public function testSetUrl() { $url = 'Dummie_url'; $this->GadgetContext->setUrl($url); $this->assertAttributeEquals($url, 'url', $this->GadgetContext); }
/** * Tests GadgetContext->setUrl() */ public function testSetUrl() { $url = 'Dummie_url'; $this->GadgetContext->setUrl($url); $this->assertEquals($url, $this->GadgetContext->getUrl()); }