/** * Sets up the fixture, for example, open a network connection. * This method is called before a test is executed. * */ protected function setUp() { Bootstrap::getServiceManager()->setAllowOverride(true); $client = new Client(['handler' => new MockHandler()]); $this->testedDao = $this->getTestedDao(); $this->testedDao->setDataProvider($client); }
/** * Proper API method, not all required params given - should throw an Exception * @expectedException \Dashboard\Model\Dao\Exception\EndpointUrlNotAssembled */ public function testNotAllRequiredParamsGiven() { Bootstrap::getServiceManager()->get('JenkinsDao')->fetchStatusForBuildWidget(['view' => 'VGTV']); }
/** * Sets up the fixture, for example, open a network connection. * This method is called before a test is executed. * */ protected function setUp() { Bootstrap::getServiceManager()->setAllowOverride(true); $this->testedDao = $this->getTestedDao(); $this->testedDao->getDataProvider()->setAdapter(new \Zend\Http\Client\Adapter\Test()); }