Browse Source

fix geminiclient tests

d9_islandora
ezoller 4 years ago
parent
commit
985f7789c3
  1. 5
      tests/src/Kernel/GeminiClientFactoryTest.php

5
tests/src/Kernel/GeminiClientFactoryTest.php

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

Loading…
Cancel
Save