예제 #1
0
 public function testGetVersionExceptionOnSetRacy()
 {
     $videoEntry = new YouTube\VideoEntry();
     $videoEntry->setMajorProtocolVersion(2);
     $exceptionCaught = false;
     try {
         $videoEntry->getRacy();
     } catch (App\VersionException $e) {
         $exceptionCaught = true;
     }
     $this->assertTrue($exceptionCaught, 'Expected exception not caught: ' . 'Zend_GData_App_VersionException');
 }
예제 #2
0
 public function testGetVideoIdV2()
 {
     $v2VideoEntry = new YouTube\VideoEntry();
     $v2VideoEntry->setMajorProtocolVersion(2);
     $v2MediaGroup = new \Zend\GData\YouTube\Extension\MediaGroup();
     $v2MediaGroup->setVideoId(new \Zend\GData\YouTube\Extension\VideoId('UMFI1hdm96E'));
     $v2VideoEntry->setMediaGroup($v2MediaGroup);
     $this->assertEquals('UMFI1hdm96E', $v2VideoEntry->getVideoId());
 }