Browse Source

More code style

pull/940/head
Jared Whiklo 2 years ago committed by Seth Shaw
parent
commit
8370383e83
  1. 36
      tests/src/Kernel/FedoraAdapterTest.php

36
tests/src/Kernel/FedoraAdapterTest.php

@ -23,7 +23,7 @@ class FedoraAdapterTest extends IslandoraKernelTestBase {
* *
* @var \Prophecy\Prophecy\ObjectProphecy * @var \Prophecy\Prophecy\ObjectProphecy
*/ */
private $mime_guesser; private $mimeGuesser;
/** /**
* A logger prophecy. * A logger prophecy.
@ -33,13 +33,13 @@ class FedoraAdapterTest extends IslandoraKernelTestBase {
private $logger; private $logger;
/** /**
* @inheritdoc * {@inheritdoc}
*/ */
public function setUp() { public function setUp() {
parent::setUp(); parent::setUp();
$this->mime_guesser = $this->prophesize(MimeTypeGuesserInterface::class) $this->mimeGuesser = $this->prophesize(MimeTypeGuesserInterface::class)
->reveal(); ->reveal();
$this->logger = $this->prophesize(LoggerChannelInterface::class)->reveal(); $this->logger = $this->prophesize(LoggerChannelInterface::class)->reveal();
} }
/** /**
@ -80,7 +80,7 @@ class FedoraAdapterTest extends IslandoraKernelTestBase {
$prophecy->getResource('', ['Connection' => 'close'])->willReturn($response); $prophecy->getResource('', ['Connection' => 'close'])->willReturn($response);
$api = $prophecy->reveal(); $api = $prophecy->reveal();
return new FedoraAdapter($api, $this->mime_guesser, $this->logger); return new FedoraAdapter($api, $this->mimeGuesser, $this->logger);
} }
/** /**
@ -95,7 +95,7 @@ class FedoraAdapterTest extends IslandoraKernelTestBase {
$prophecy->getResource('', ['Connection' => 'close'])->willReturn($response); $prophecy->getResource('', ['Connection' => 'close'])->willReturn($response);
$api = $prophecy->reveal(); $api = $prophecy->reveal();
return new FedoraAdapter($api, $this->mime_guesser, $this->logger); return new FedoraAdapter($api, $this->mimeGuesser, $this->logger);
} }
/** /**
@ -117,7 +117,7 @@ class FedoraAdapterTest extends IslandoraKernelTestBase {
$prophecy->getResourceHeaders('', ['Connection' => 'close'])->willReturn($response); $prophecy->getResourceHeaders('', ['Connection' => 'close'])->willReturn($response);
$api = $prophecy->reveal(); $api = $prophecy->reveal();
return new FedoraAdapter($api, $this->mime_guesser, $this->logger); return new FedoraAdapter($api, $this->mimeGuesser, $this->logger);
} }
/** /**
@ -142,7 +142,7 @@ class FedoraAdapterTest extends IslandoraKernelTestBase {
$api = $fedora_prophecy->reveal(); $api = $fedora_prophecy->reveal();
return new FedoraAdapter($api, $this->mime_guesser, $this->logger); return new FedoraAdapter($api, $this->mimeGuesser, $this->logger);
} }
/** /**
@ -162,7 +162,7 @@ class FedoraAdapterTest extends IslandoraKernelTestBase {
$api = $fedora_prophecy->reveal(); $api = $fedora_prophecy->reveal();
return new FedoraAdapter($api, $this->mime_guesser, $this->logger); return new FedoraAdapter($api, $this->mimeGuesser, $this->logger);
} }
/** /**
@ -190,7 +190,7 @@ class FedoraAdapterTest extends IslandoraKernelTestBase {
$api = $fedora_prophecy->reveal(); $api = $fedora_prophecy->reveal();
return new FedoraAdapter($api, $this->mime_guesser, $this->logger); return new FedoraAdapter($api, $this->mimeGuesser, $this->logger);
} }
/** /**
@ -206,7 +206,7 @@ class FedoraAdapterTest extends IslandoraKernelTestBase {
$fedora_prophecy->getResourceHeaders('', ['Connection' => 'close'])->willReturn($prophecy->reveal()); $fedora_prophecy->getResourceHeaders('', ['Connection' => 'close'])->willReturn($prophecy->reveal());
$api = $fedora_prophecy->reveal(); $api = $fedora_prophecy->reveal();
return new FedoraAdapter($api, $this->mime_guesser, $this->logger); return new FedoraAdapter($api, $this->mimeGuesser, $this->logger);
} }
/** /**
@ -222,7 +222,7 @@ class FedoraAdapterTest extends IslandoraKernelTestBase {
$api = $fedora_prophecy->reveal(); $api = $fedora_prophecy->reveal();
return new FedoraAdapter($api, $this->mime_guesser, $this->logger); return new FedoraAdapter($api, $this->mimeGuesser, $this->logger);
} }
/** /**
@ -250,7 +250,7 @@ class FedoraAdapterTest extends IslandoraKernelTestBase {
$api = $fedora_prophecy->reveal(); $api = $fedora_prophecy->reveal();
return new FedoraAdapter($api, $this->mime_guesser, $this->logger); return new FedoraAdapter($api, $this->mimeGuesser, $this->logger);
} }
/** /**
@ -278,7 +278,7 @@ class FedoraAdapterTest extends IslandoraKernelTestBase {
$api = $fedora_prophecy->reveal(); $api = $fedora_prophecy->reveal();
return new FedoraAdapter($api, $this->mime_guesser, $this->logger); return new FedoraAdapter($api, $this->mimeGuesser, $this->logger);
} }
/** /**
@ -639,7 +639,7 @@ class FedoraAdapterTest extends IslandoraKernelTestBase {
$api = $fedora_prophecy->reveal(); $api = $fedora_prophecy->reveal();
$adapter = new FedoraAdapter($api, $this->mime_guesser, $this->logger); $adapter = new FedoraAdapter($api, $this->mimeGuesser, $this->logger);
$this->assertTrue($adapter->rename('', '') == TRUE, "rename() must return TRUE on success"); $this->assertTrue($adapter->rename('', '') == TRUE, "rename() must return TRUE on success");
} }
@ -656,7 +656,7 @@ class FedoraAdapterTest extends IslandoraKernelTestBase {
$api = $fedora_prophecy->reveal(); $api = $fedora_prophecy->reveal();
$adapter = new FedoraAdapter($api, $this->mime_guesser, $this->logger); $adapter = new FedoraAdapter($api, $this->mimeGuesser, $this->logger);
$this->assertTrue($adapter->createDir('', $this->prophesize(Config::class) $this->assertTrue($adapter->createDir('', $this->prophesize(Config::class)
->reveal()) == FALSE, "createDir() must return FALSE on fail"); ->reveal()) == FALSE, "createDir() must return FALSE on fail");

Loading…
Cancel
Save