/** * @covers WindowsAzure\MediaServices\Models\ContentKeyAuthorizationPolicyOption::getRestrictions * @covers WindowsAzure\MediaServices\Models\ContentKeyAuthorizationPolicyOption::setRestrictions */ public function testGetSetRestrictions() { // Setup $name = TestResources::MEDIA_SERVICES_CONTENT_KEY_AUTHORIZATION_OPTIONS_NAME; $restrictionName = TestResources::MEDIA_SERVICES_CONTENT_KEY_AUTHORIZATION_POLICY_RESTRICTION_NAME; $restriction = new ContentKeyAuthorizationPolicyRestriction(); $restriction->setName($restrictionName); $restriction->setKeyRestrictionType(ContentKeyRestrictionType::OPEN); $restrictions = array($restriction); $options = new ContentKeyAuthorizationPolicyOption(); $options->setName($name); $options->setKeyDeliveryType(ContentKeyDeliveryType::BASELINE_HTTP); $options->setRestrictions($restrictions); // Test $result = $options->getRestrictions(); // Assert $this->assertEquals($result, $restrictions); }