|
|
@ -51,12 +51,14 @@ class FedoraAdapterTest extends IslandoraKernelTestBase { |
|
|
|
]); |
|
|
|
]); |
|
|
|
$prophecy->getHeader('Content-Type')->willReturn(['text/plain']); |
|
|
|
$prophecy->getHeader('Content-Type')->willReturn(['text/plain']); |
|
|
|
$prophecy->getHeader('Content-Length')->willReturn([strlen("DERP")]); |
|
|
|
$prophecy->getHeader('Content-Length')->willReturn([strlen("DERP")]); |
|
|
|
|
|
|
|
// phpcs:disable |
|
|
|
if (class_exists(\GuzzleHttp\Psr7\Utils::class)) { |
|
|
|
if (class_exists(\GuzzleHttp\Psr7\Utils::class)) { |
|
|
|
$prophecy->getBody()->willReturn(\GuzzleHttp\Psr7\Utils::streamFor("DERP")); |
|
|
|
$prophecy->getBody()->willReturn(\GuzzleHttp\Psr7\Utils::streamFor("DERP")); |
|
|
|
} |
|
|
|
} |
|
|
|
else { |
|
|
|
else { |
|
|
|
$prophecy->getBody()->willReturn(\GuzzleHttp\Psr7\stream_for("DERP")); |
|
|
|
$prophecy->getBody()->willReturn(\GuzzleHttp\Psr7\stream_for("DERP")); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// phpcs:enable |
|
|
|
$response = $prophecy->reveal(); |
|
|
|
$response = $prophecy->reveal(); |
|
|
|
|
|
|
|
|
|
|
|
$prophecy = $this->prophesize(IFedoraApi::class); |
|
|
|
$prophecy = $this->prophesize(IFedoraApi::class); |
|
|
@ -122,13 +124,14 @@ class FedoraAdapterTest extends IslandoraKernelTestBase { |
|
|
|
]); |
|
|
|
]); |
|
|
|
$prophecy->getHeader('Content-Type')->willReturn(['text/plain']); |
|
|
|
$prophecy->getHeader('Content-Type')->willReturn(['text/plain']); |
|
|
|
$prophecy->getHeader('Content-Length')->willReturn([strlen("DERP")]); |
|
|
|
$prophecy->getHeader('Content-Length')->willReturn([strlen("DERP")]); |
|
|
|
|
|
|
|
// phpcs:disable |
|
|
|
if (class_exists(\GuzzleHttp\Psr7\Utils::class)) { |
|
|
|
if (class_exists(\GuzzleHttp\Psr7\Utils::class)) { |
|
|
|
$prophecy->getBody()->willReturn(\GuzzleHttp\Psr7\Utils::streamFor("DERP")); |
|
|
|
$prophecy->getBody()->willReturn(\GuzzleHttp\Psr7\Utils::streamFor("DERP")); |
|
|
|
} |
|
|
|
} |
|
|
|
else { |
|
|
|
else { |
|
|
|
$prophecy->getBody()->willReturn(\GuzzleHttp\Psr7\stream_for("DERP")); |
|
|
|
$prophecy->getBody()->willReturn(\GuzzleHttp\Psr7\stream_for("DERP")); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// phpcs:enable |
|
|
|
$fedora_prophecy->getResourceHeaders('')->willReturn($prophecy->reveal()); |
|
|
|
$fedora_prophecy->getResourceHeaders('')->willReturn($prophecy->reveal()); |
|
|
|
|
|
|
|
|
|
|
|
$api = $fedora_prophecy->reveal(); |
|
|
|
$api = $fedora_prophecy->reveal(); |
|
|
@ -619,12 +622,14 @@ class FedoraAdapterTest extends IslandoraKernelTestBase { |
|
|
|
]); |
|
|
|
]); |
|
|
|
$prophecy->getHeader('Content-Type')->willReturn(['text/plain']); |
|
|
|
$prophecy->getHeader('Content-Type')->willReturn(['text/plain']); |
|
|
|
$prophecy->getHeader('Content-Length')->willReturn([strlen("DERP")]); |
|
|
|
$prophecy->getHeader('Content-Length')->willReturn([strlen("DERP")]); |
|
|
|
|
|
|
|
// phpcs:disable |
|
|
|
if (class_exists(\GuzzleHttp\Psr7\Utils::class)) { |
|
|
|
if (class_exists(\GuzzleHttp\Psr7\Utils::class)) { |
|
|
|
$prophecy->getBody()->willReturn(\GuzzleHttp\Psr7\Utils::streamFor("DERP")); |
|
|
|
$prophecy->getBody()->willReturn(\GuzzleHttp\Psr7\Utils::streamFor("DERP")); |
|
|
|
} |
|
|
|
} |
|
|
|
else { |
|
|
|
else { |
|
|
|
$prophecy->getBody()->willReturn(\GuzzleHttp\Psr7\stream_for("DERP")); |
|
|
|
$prophecy->getBody()->willReturn(\GuzzleHttp\Psr7\stream_for("DERP")); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// phpcs:enable |
|
|
|
$response = $prophecy->reveal(); |
|
|
|
$response = $prophecy->reveal(); |
|
|
|
|
|
|
|
|
|
|
|
$fedora_prophecy = $this->prophesize(IFedoraApi::class); |
|
|
|
$fedora_prophecy = $this->prophesize(IFedoraApi::class); |
|
|
|