|
|
@ -8,6 +8,7 @@ use Drupal\islandora\GeminiClientFactory; |
|
|
|
use Islandora\Crayfish\Commons\Client\GeminiClient; |
|
|
|
use Islandora\Crayfish\Commons\Client\GeminiClient; |
|
|
|
use Prophecy\Argument; |
|
|
|
use Prophecy\Argument; |
|
|
|
use Psr\Log\LoggerInterface; |
|
|
|
use Psr\Log\LoggerInterface; |
|
|
|
|
|
|
|
use Symfony\Component\HttpKernel\Exception\PreconditionFailedHttpException; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Tests GeminiClientFactory. |
|
|
|
* Tests GeminiClientFactory. |
|
|
@ -38,9 +39,9 @@ class GeminiClientFactoryTest extends IslandoraKernelTestBase { |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @covers ::create |
|
|
|
* @covers ::create |
|
|
|
* @expectedException \Symfony\Component\HttpKernel\Exception\PreconditionFailedHttpException |
|
|
|
|
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public function testNoUrlBlank() { |
|
|
|
public function testNoUrlBlank() { |
|
|
|
|
|
|
|
$this->expectException(PreconditionFailedHttpException::class); |
|
|
|
$prophecy = $this->prophesize(ImmutableConfig::class); |
|
|
|
$prophecy = $this->prophesize(ImmutableConfig::class); |
|
|
|
$prophecy->get(Argument::any())->willReturn(''); |
|
|
|
$prophecy->get(Argument::any())->willReturn(''); |
|
|
|
$immutConfig = $prophecy->reveal(); |
|
|
|
$immutConfig = $prophecy->reveal(); |
|
|
@ -54,9 +55,9 @@ class GeminiClientFactoryTest extends IslandoraKernelTestBase { |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @covers ::create |
|
|
|
* @covers ::create |
|
|
|
* @expectedException \Symfony\Component\HttpKernel\Exception\PreconditionFailedHttpException |
|
|
|
|
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public function testNoUrlNull() { |
|
|
|
public function testNoUrlNull() { |
|
|
|
|
|
|
|
$this->expectException(PreconditionFailedHttpException::class); |
|
|
|
$prophecy = $this->prophesize(ImmutableConfig::class); |
|
|
|
$prophecy = $this->prophesize(ImmutableConfig::class); |
|
|
|
$prophecy->get(Argument::any())->willReturn(NULL); |
|
|
|
$prophecy->get(Argument::any())->willReturn(NULL); |
|
|
|
$immutConfig = $prophecy->reveal(); |
|
|
|
$immutConfig = $prophecy->reveal(); |
|
|
|