本文整理汇总了PHP中Tests\Framework\TestResources::getContainerAclMultipleEntriesSample方法的典型用法代码示例。如果您正苦于以下问题:PHP TestResources::getContainerAclMultipleEntriesSample方法的具体用法?PHP TestResources::getContainerAclMultipleEntriesSample怎么用?PHP TestResources::getContainerAclMultipleEntriesSample使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tests\Framework\TestResources
的用法示例。
在下文中一共展示了TestResources::getContainerAclMultipleEntriesSample方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testSetContainerAcl
/**
* @covers WindowsAzure\Blob\BlobRestProxy::setContainerAcl
*/
public function testSetContainerAcl()
{
// Setup
$name = 'setcontaineracl' . $this->createSuffix();
$this->createContainer($name);
$sample = TestResources::getContainerAclMultipleEntriesSample();
$expectedETag = '0x8CAFB82EFF70C46';
$expectedLastModified = new \DateTime('Sun, 25 Sep 2011 19:42:18 GMT');
$expectedPublicAccess = 'container';
$acl = ContainerAcl::create($expectedPublicAccess, $sample['SignedIdentifiers']);
// Test
$this->restProxy->setContainerAcl($name, $acl);
// Assert
$actual = $this->restProxy->getContainerAcl($name);
$this->assertEquals($acl->getPublicAccess(), $actual->getContainerAcl()->getPublicAccess());
$this->assertEquals($acl->getSignedIdentifiers(), $actual->getContainerAcl()->getSignedIdentifiers());
}
示例2: testToXml
/**
* @covers WindowsAzure\Blob\Models\ContainerAcl::toXml
* @covers WindowsAzure\Blob\Models\ContainerAcl::toArray
* @depends testCreateMultipleEntries
*/
public function testToXml($acl)
{
// Setup
$sample = TestResources::getContainerAclMultipleEntriesSample();
$expected = ContainerAcl::create('container', $sample['SignedIdentifiers']);
$xmlSerializer = new XmlSerializer();
// Test
$xml = $acl->toXml($xmlSerializer);
// Assert
$array = Utilities::unserialize($xml);
$acl = ContainerAcl::create('container', $array);
$this->assertEquals($expected->getSignedIdentifiers(), $acl->getSignedIdentifiers());
}