本文整理汇总了PHP中Aws\S3\S3Client::expects方法的典型用法代码示例。如果您正苦于以下问题:PHP S3Client::expects方法的具体用法?PHP S3Client::expects怎么用?PHP S3Client::expects使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Aws\S3\S3Client
的用法示例。
在下文中一共展示了S3Client::expects方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testCanCompleteMultipartUpload
public function testCanCompleteMultipartUpload()
{
$this->prepareTransfer();
$model = $this->getMockBuilder('Guzzle\\Service\\Resource\\Model')->disableOriginalConstructor()->getMock();
$command = $this->getMockBuilder('Guzzle\\Service\\Command\\OperationCommand')->disableOriginalConstructor()->getMock();
$command->expects($this->any())->method('getResult')->will($this->returnValue($model));
$this->client->expects($this->any())->method('getCommand')->will($this->returnValue($command));
$this->assertInstanceOf('Guzzle\\Service\\Resource\\Model', $this->callProtectedMethod($this->transfer, 'complete'));
}
示例2: withHeadObjectThrowingException
protected function withHeadObjectThrowingException()
{
$this->s3Client->expects($this->once())->method('headObject')->willThrowException(new \Exception());
}
示例3: testCopyFromDFSToDFS
public function testCopyFromDFSToDFS()
{
$this->s3ClientMock->expects($this->once())->method('copyObject')->will($this->returnValue(new Model()));
self::assertTrue($this->dfs->copyFromDFSToDFS('var/test/storage/images/a.png', 'var/test/storage/images/b.png'));
}