Example #1
0
 /**
  * @expectedException Zend_Gdata_App_Exception
  */
 public function testGetVideoIdException()
 {
     $videoEntry = new Zend_Gdata_YouTube_VideoEntry();
     // assert invalid ID
     $videoEntry->id = new Zend_Gdata_App_Extension_Id('adfadfasf');
     $this->assertEquals('adfadfasf', $videoEntry->getVideoId());
 }
 public function testGetVideoIdException()
 {
     $exceptionCaught = false;
     $videoEntry = new Zend_Gdata_YouTube_VideoEntry();
     // use invalid ID
     $videoEntry->id = new Zend_Gdata_App_Extension_Id('adfadfasf');
     try {
         $videoEntry->getVideoId();
     } catch (Zend_Gdata_App_Exception $e) {
         $exceptionCaught = true;
     }
     $this->assertTrue($exceptionCaught, 'Expected exception not caught: ' . 'Zend_Gdata_AppException');
 }