コード例 #1
0
 /**
  * Get ContentKey.
  *
  * @param Models\ContentKey|string $contentKey An ContentKey data or
  * ContentKey Id
  *
  * @return Models\ContentKey
  */
 public function getContentKey($contentKey)
 {
     $contentKeyId = Utilities::getEntityId($contentKey, 'WindowsAzure\\Mediaservices\\Models\\ContentKey');
     return ContentKey::createFromOptions($this->_getEntity("ContentKeys('{$contentKeyId}')"));
 }
コード例 #2
0
 /**
  * @covers WindowsAzure\MediaServices\Models\ContentKey::getLastModified
  */
 public function testGetLastModified()
 {
     // Setup
     $options = array('LastModified' => '2013-02-26');
     $modified = new \Datetime($options['LastModified']);
     $contentKey = ContentKey::createFromOptions($options);
     // Test
     $result = $contentKey->getLastModified();
     // Assert
     $this->assertEquals($modified->getTimestamp(), $result->getTimestamp());
 }