@@ -15,8 +15,7 @@ |
||
15 | 15 | use Kitodo\Dlf\Format\AudioVideoMD; |
16 | 16 | use TYPO3\TestingFramework\Core\Unit\UnitTestCase; |
17 | 17 | |
18 | -class AudioVideoMDTest extends UnitTestCase |
|
19 | -{ |
|
18 | +class AudioVideoMDTest extends UnitTestCase { |
|
20 | 19 | protected $metadata = []; |
21 | 20 | |
22 | 21 | public function setUp(): void |
@@ -15,8 +15,7 @@ |
||
15 | 15 | use Kitodo\Dlf\Format\Alto; |
16 | 16 | use TYPO3\TestingFramework\Core\Unit\UnitTestCase; |
17 | 17 | |
18 | -class AltoTest extends UnitTestCase |
|
19 | -{ |
|
18 | +class AltoTest extends UnitTestCase { |
|
20 | 19 | /** |
21 | 20 | * @test |
22 | 21 | * @group extract data |
@@ -14,8 +14,7 @@ |
||
14 | 14 | |
15 | 15 | use TYPO3\TestingFramework\Core\Unit\UnitTestCase; |
16 | 16 | |
17 | -class TeiHeaderTest extends UnitTestCase |
|
18 | -{ |
|
17 | +class TeiHeaderTest extends UnitTestCase { |
|
19 | 18 | protected $metadata = []; |
20 | 19 | |
21 | 20 | public function setUp(): void |
@@ -15,10 +15,8 @@ |
||
15 | 15 | use Kitodo\Dlf\Common\Helper; |
16 | 16 | use TYPO3\TestingFramework\Core\Unit\UnitTestCase; |
17 | 17 | |
18 | -class HelperTest extends UnitTestCase |
|
19 | -{ |
|
20 | - public function assertInvalidXml($xml) |
|
21 | - { |
|
18 | +class HelperTest extends UnitTestCase { |
|
19 | + public function assertInvalidXml($xml) { |
|
22 | 20 | $result = Helper::getXmlFileAsString($xml); |
23 | 21 | self::assertEquals(false, $result); |
24 | 22 | } |
@@ -15,8 +15,7 @@ |
||
15 | 15 | use Kitodo\Dlf\Domain\Repository\TokenRepository; |
16 | 16 | use Kitodo\Dlf\Tests\Functional\FunctionalTestCase; |
17 | 17 | |
18 | -class TokenRepositoryTest extends FunctionalTestCase |
|
19 | -{ |
|
18 | +class TokenRepositoryTest extends FunctionalTestCase { |
|
20 | 19 | /** |
21 | 20 | * @var TokenRepository |
22 | 21 | */ |
@@ -16,8 +16,7 @@ |
||
16 | 16 | use Kitodo\Dlf\Domain\Repository\CollectionRepository; |
17 | 17 | use Kitodo\Dlf\Tests\Functional\FunctionalTestCase; |
18 | 18 | |
19 | -class CollectionRepositoryTest extends FunctionalTestCase |
|
20 | -{ |
|
19 | +class CollectionRepositoryTest extends FunctionalTestCase { |
|
21 | 20 | /** |
22 | 21 | * @var CollectionRepository |
23 | 22 | */ |
@@ -16,8 +16,7 @@ |
||
16 | 16 | use Kitodo\Dlf\Domain\Repository\MailRepository; |
17 | 17 | use Kitodo\Dlf\Tests\Functional\FunctionalTestCase; |
18 | 18 | |
19 | -class MailRepositoryTest extends FunctionalTestCase |
|
20 | -{ |
|
19 | +class MailRepositoryTest extends FunctionalTestCase { |
|
21 | 20 | /** |
22 | 21 | * @var MailRepository |
23 | 22 | */ |
@@ -16,8 +16,7 @@ discard block |
||
16 | 16 | use Kitodo\Dlf\Domain\Repository\MetadataRepository; |
17 | 17 | use Kitodo\Dlf\Tests\Functional\FunctionalTestCase; |
18 | 18 | |
19 | -class MetadataRepositoryTest extends FunctionalTestCase |
|
20 | -{ |
|
19 | +class MetadataRepositoryTest extends FunctionalTestCase { |
|
21 | 20 | /** |
22 | 21 | * @var MetadataRepository |
23 | 22 | */ |
@@ -40,8 +39,7 @@ discard block |
||
40 | 39 | * @param $settings |
41 | 40 | * @return array |
42 | 41 | */ |
43 | - protected function findBySettings($settings) |
|
44 | - { |
|
42 | + protected function findBySettings($settings) { |
|
45 | 43 | $metadata = $this->metadataRepository->findBySettings($settings); |
46 | 44 | self::assertNotNull($metadata); |
47 | 45 | self::assertInstanceOf(QueryResult::class, $metadata); |
@@ -21,8 +21,7 @@ discard block |
||
21 | 21 | use Phpoaipmh\Exception\OaipmhException; |
22 | 22 | use SimpleXMLElement; |
23 | 23 | |
24 | -class OaiPmhTest extends FunctionalTestCase |
|
25 | -{ |
|
24 | +class OaiPmhTest extends FunctionalTestCase { |
|
26 | 25 | protected $disableJsonWrappedResponse = true; |
27 | 26 | |
28 | 27 | protected $coreExtensionsToLoad = [ |
@@ -66,8 +65,7 @@ discard block |
||
66 | 65 | $this->setUpOaiSolr(); |
67 | 66 | } |
68 | 67 | |
69 | - protected function setUpOaiSolr() |
|
70 | - { |
|
68 | + protected function setUpOaiSolr() { |
|
71 | 69 | // Setup Solr only once for all tests in this suite |
72 | 70 | static $solr = null; |
73 | 71 | |
@@ -87,8 +85,7 @@ discard block |
||
87 | 85 | /** |
88 | 86 | * @test |
89 | 87 | */ |
90 | - public function correctlyRespondsOnBadVerb() |
|
91 | - { |
|
88 | + public function correctlyRespondsOnBadVerb() { |
|
92 | 89 | $client = new HttpClient(); |
93 | 90 | $response = $client->get($this->baseUrl, [ |
94 | 91 | 'query' => [ |
@@ -113,8 +110,7 @@ discard block |
||
113 | 110 | /** |
114 | 111 | * @test |
115 | 112 | */ |
116 | - public function canIdentify() |
|
117 | - { |
|
113 | + public function canIdentify() { |
|
118 | 114 | $oai = Endpoint::build($this->oaiUrl); |
119 | 115 | $identity = $oai->identify(); |
120 | 116 | |
@@ -127,8 +123,7 @@ discard block |
||
127 | 123 | /** |
128 | 124 | * @test |
129 | 125 | */ |
130 | - public function identifyGivesFallbackDatestampWhenNoDocuments() |
|
131 | - { |
|
126 | + public function identifyGivesFallbackDatestampWhenNoDocuments() { |
|
132 | 127 | $oai = Endpoint::build($this->oaiUrlNoStoragePid); |
133 | 128 | $identity = $oai->identify(); |
134 | 129 | |
@@ -138,8 +133,7 @@ discard block |
||
138 | 133 | /** |
139 | 134 | * @test |
140 | 135 | */ |
141 | - public function canListMetadataFormats() |
|
142 | - { |
|
136 | + public function canListMetadataFormats() { |
|
143 | 137 | $oai = Endpoint::build($this->oaiUrl); |
144 | 138 | $formats = $oai->listMetadataFormats(); |
145 | 139 | |
@@ -154,8 +148,7 @@ discard block |
||
154 | 148 | /** |
155 | 149 | * @test |
156 | 150 | */ |
157 | - public function canListRecords() |
|
158 | - { |
|
151 | + public function canListRecords() { |
|
159 | 152 | $oai = Endpoint::build($this->oaiUrl); |
160 | 153 | $result = $oai->listRecords('mets'); |
161 | 154 | |
@@ -168,8 +161,7 @@ discard block |
||
168 | 161 | /** |
169 | 162 | * @test |
170 | 163 | */ |
171 | - public function noRecordsUntil1900() |
|
172 | - { |
|
164 | + public function noRecordsUntil1900() { |
|
173 | 165 | $this->expectException(OaipmhException::class); |
174 | 166 | $this->expectExceptionMessage('empty list'); |
175 | 167 | |
@@ -182,8 +174,7 @@ discard block |
||
182 | 174 | /** |
183 | 175 | * @test |
184 | 176 | */ |
185 | - public function canUseResumptionToken() |
|
186 | - { |
|
177 | + public function canUseResumptionToken() { |
|
187 | 178 | // NOTE: cursor and expirationDate are optional by the specification, |
188 | 179 | // but we include them in our implementation |
189 | 180 | |
@@ -241,8 +232,7 @@ discard block |
||
241 | 232 | /** |
242 | 233 | * @test |
243 | 234 | */ |
244 | - public function noResumptionTokenForCompleteList() |
|
245 | - { |
|
235 | + public function noResumptionTokenForCompleteList() { |
|
246 | 236 | $client = new HttpClient(); |
247 | 237 | |
248 | 238 | foreach (['ListIdentifiers', 'ListRecords'] as $verb) { |
@@ -264,8 +254,7 @@ discard block |
||
264 | 254 | /** |
265 | 255 | * @test |
266 | 256 | */ |
267 | - public function canListAndResumeIdentifiers() |
|
268 | - { |
|
257 | + public function canListAndResumeIdentifiers() { |
|
269 | 258 | $oai = Endpoint::build($this->oaiUrl); |
270 | 259 | $result = $oai->listIdentifiers('mets'); |
271 | 260 | |
@@ -278,18 +267,15 @@ discard block |
||
278 | 267 | self::assertEquals('oai:de:slub-dresden:db:id-476248086', $record->identifier); |
279 | 268 | } |
280 | 269 | |
281 | - protected function parseUtc(string $dateTime) |
|
282 | - { |
|
270 | + protected function parseUtc(string $dateTime) { |
|
283 | 271 | return DateTime::createFromFormat('Y-m-d\TH:i:s\Z', $dateTime); |
284 | 272 | } |
285 | 273 | |
286 | - protected function assertUtcDateString(string $dateTime) |
|
287 | - { |
|
274 | + protected function assertUtcDateString(string $dateTime) { |
|
288 | 275 | self::assertInstanceOf(DateTime::class, $this->parseUtc($dateTime)); |
289 | 276 | } |
290 | 277 | |
291 | - protected function assertInFuture(string $dateTime) |
|
292 | - { |
|
278 | + protected function assertInFuture(string $dateTime) { |
|
293 | 279 | self::assertGreaterThan(new DateTime(), $this->parseUtc($dateTime)); |
294 | 280 | } |
295 | 281 | } |