Пример #1
0
 /**
  * Ensures that localSearch() throws an exception when the sort option is invalid
  *
  * @return void
  */
 public function testLocalSearchExceptionSortInvalid()
 {
     try {
         $this->_yahoo->localSearch('php', array('location' => '95014', 'sort' => 'oops'));
         $this->fail('Expected Zend_Service_Exception not thrown');
     } catch (Zend_Service_Exception $e) {
         $this->assertContains("option 'sort'", $e->getMessage());
     }
 }
Пример #2
0
 /**
  * Ensures that localSearch() throws an exception when the radius option is invalid
  *
  * @return void
  */
 public function testLocalSearchExceptionRadiusInvalid()
 {
     try {
         $this->_yahoo->localSearch('php', array('zip' => '95014', 'radius' => -1));
         $this->fail('Expected Zend_Service_Exception not thrown');
     } catch (Zend_Service_Exception $e) {
         $this->assertContains('error occurred sending request', $e->getMessage());
     }
 }