/** * @covers WindowsAzure\MediaServices\Templates\PlayReadyPlayRight::getDigitalVideoOnlyContentRestriction * @covers WindowsAzure\MediaServices\Templates\PlayReadyPlayRight::setDigitalVideoOnlyContentRestriction */ public function testGetSetDigitalVideoOnlyContentRestriction() { // Setup $entity = new PlayReadyPlayRight(); $payload = true; // Test $entity->setDigitalVideoOnlyContentRestriction($payload); $result = $entity->getDigitalVideoOnlyContentRestriction(); // Assert $this->assertEquals($payload, $result); }
/** * @param mixed $writer * @param PlayReadyPlayRight $playright */ private static function serializePlayRight($writer, $playright) { $writer->startElement('PlayRight'); if ($playright->getAgcAndColorStripeRestriction() != null) { $writer->startElement('AgcAndColorStripeRestriction'); $writer->writeElement('ConfigurationData', $playright->getAgcAndColorStripeRestriction()->getConfigurationData()); $writer->endElement(); } if ($playright->getAllowPassingVideoContentToUnknownOutput()) { $writer->writeElement('AllowPassingVideoContentToUnknownOutput', $playright->getAllowPassingVideoContentToUnknownOutput()); } if ($playright->getAnalogVideoOpl() > 0) { $writer->writeElement('AnalogVideoOpl', $playright->getAnalogVideoOpl()); } if ($playright->getCompressedDigitalAudioOpl() > 0) { $writer->writeElement('CompressedDigitalAudioOpl', $playright->getCompressedDigitalAudioOpl()); } if ($playright->getCompressedDigitalVideoOpl() > 0) { $writer->writeElement('CompressedDigitalVideoOpl', $playright->getCompressedDigitalVideoOpl()); } if ($playright->getDigitalVideoOnlyContentRestriction()) { $writer->writeElement('DigitalVideoOnlyContentRestriction', 'true'); } if ($playright->getExplicitAnalogTelevisionOutputRestriction()) { $restriction = $playright->getExplicitAnalogTelevisionOutputRestriction(); $writer->startElement('ExplicitAnalogTelevisionOutputRestriction'); $writer->writeElement('BestEffort', $restriction->getBestEffort() ? 'true' : 'false'); $writer->writeElement('ConfigurationData', $restriction->getConfigurationData()); $writer->endElement(); } if ($playright->getFirstPlayExpiration() != null) { $writer->writeElement('FirstPlayExpiration', self::getSpecString($playright->getFirstPlayExpiration())); } if ($playright->getImageConstraintForAnalogComponentVideoRestriction()) { $writer->writeElement('ImageConstraintForAnalogComponentVideoRestriction', 'true'); } if ($playright->getImageConstraintForAnalogComputerMonitorRestriction()) { $writer->writeElement('ImageConstraintForAnalogComputerMonitorRestriction', 'true'); } if ($playright->getScmsRestriction() != null) { $writer->startElement('ScmsRestriction'); $writer->writeElement('ConfigurationData', $playright->getScmsRestriction()->getConfigurationData()); $writer->endElement(); } if ($playright->getUncompressedDigitalAudioOpl() > 0) { $writer->writeElement('UncompressedDigitalAudioOpl', $playright->getUncompressedDigitalAudioOpl()); } if ($playright->getUncompressedDigitalVideoOpl() > 0) { $writer->writeElement('UncompressedDigitalVideoOpl', $playright->getUncompressedDigitalVideoOpl()); } $writer->endElement(); }