SoapServer/Client now handle binary files correctly & large tests/fixtures update
Soap Server and Client were breaking binary files during transfer due to invalid Mime Message Parser. Now is it working fine with no errors, but the message parser is about to be rewritten into a better form.
This commit is contained in:
32
tests/Fixtures/DummyServiceHandlerWithOutgoingLargeSwa.php
Normal file
32
tests/Fixtures/DummyServiceHandlerWithOutgoingLargeSwa.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace Fixtures;
|
||||
|
||||
use BeSimple\SoapServerAndSoapClientCommunicationTest;
|
||||
use Fixtures\Attachment\Attachment;
|
||||
use Fixtures\Attachment\AttachmentCollection;
|
||||
|
||||
class DummyServiceHandlerWithOutgoingLargeSwa
|
||||
{
|
||||
/**
|
||||
* @param DummyServiceMethodWithOutgoingLargeSwaRequest $request
|
||||
* @return DummyServiceMethodWithOutgoingLargeSwaResponse
|
||||
*/
|
||||
public function handle(DummyServiceMethodWithOutgoingLargeSwaRequest $request)
|
||||
{
|
||||
$response = new DummyServiceMethodWithOutgoingLargeSwaResponse();
|
||||
$response->status = true;
|
||||
|
||||
$response->attachmentCollection = new AttachmentCollection([
|
||||
new Attachment('filename.txt', 'text/plain', 'plaintext file'),
|
||||
new Attachment('filename.html', 'text/html', '<html><body>Hello world</body></html>'),
|
||||
new Attachment(
|
||||
'filename.docx',
|
||||
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
||||
file_get_contents(SoapServerAndSoapClientCommunicationTest::LARGE_SWA_FILE)
|
||||
),
|
||||
]);
|
||||
|
||||
return $response;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user