Browse Source

More code style

MNPALS-2.x
Jared Whiklo 2 years ago committed by Rosie Le Faive
parent
commit
ff4e0cafc4
  1. 30
      tests/src/Kernel/FedoraAdapterTest.php

30
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,11 +33,11 @@ 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