/**
  * 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);
 }
Ejemplo n.º 2
0
 /**
  * Adding datetimes parsing before assembling URL using parent method.
  * {@inheritdoc}
  */
 protected function assembleUrl($url, $params = array())
 {
     if (isset($params['beginDateTime'])) {
         $params['beginDateTime'] = gmdate('Y-m-d', strtotime($params['beginDateTime'])) . 'T' . gmdate('H:i:s', strtotime($params['beginDateTime'])) . 'Z';
     }
     if (isset($params['endDateTime'])) {
         $params['endDateTime'] = gmdate('Y-m-d', strtotime($params['endDateTime'])) . 'T' . gmdate('H:i:s', strtotime($params['endDateTime'])) . 'Z';
     }
     $url = parent::assembleUrl($url, $params);
     return $url;
 }
Ejemplo n.º 3
0
 /**
  * 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());
 }