assertSame( "An exception occurred while {$status} a multipart upload: $msg", $exception->getMessage() ); $this->assertSame($state, $exception->getState()); $this->assertSame($prev, $exception->getPrevious()); } public function getTestCases() { return [ ['CreateMultipartUpload', 'initiating'], ['InitiateMultipartUpload', 'initiating'], ['CompleteMultipartUpload', 'completing'], ['OtherCommands', 'performing'], ]; } public function testCanCreateExceptionListingFailedParts() { $state = new UploadState([]); $failed = [ 1 => new AwsException('Bad digest.', new Command('UploadPart')), 5 => new AwsException('Missing header.', new Command('UploadPart')), 8 => new AwsException('Needs more love.', new Command('UploadPart')), ]; $exception = new MultipartUploadException($state, $failed); $expected = <<assertSame($expected, $exception->getMessage()); } }