Completed
Push — master ( f0bd62...1253ac )
by
unknown
16s queued 13s
created
Tests/Functional/FunctionalTestCase.php 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -64,8 +64,7 @@  discard block
 block discarded – undo
64 64
      */
65 65
     protected $httpClient;
66 66
 
67
-    public function __construct()
68
-    {
67
+    public function __construct() {
69 68
         parent::__construct();
70 69
 
71 70
         $this->configurationToUseInTestInstance['EXTENSIONS']['dlf'] = $this->getDlfConfiguration();
@@ -92,8 +91,7 @@  discard block
 block discarded – undo
92 91
         $this->addSiteConfig('dlf-testing', $this->baseUrl);
93 92
     }
94 93
 
95
-    protected function getDlfConfiguration()
96
-    {
94
+    protected function getDlfConfiguration() {
97 95
         return [
98 96
             'solrFieldAutocomplete' => 'autocomplete',
99 97
             'solrFieldCollection' => 'collection',
@@ -125,8 +123,7 @@  discard block
 block discarded – undo
125 123
         ];
126 124
     }
127 125
 
128
-    protected function addSiteConfig($identifier, $baseUrl)
129
-    {
126
+    protected function addSiteConfig($identifier, $baseUrl) {
130 127
         $siteConfig = Yaml::parseFile(__DIR__ . '/../Fixtures/siteconfig.yaml');
131 128
         $siteConfig['base'] = $baseUrl;
132 129
         $siteConfig['languages'][0]['base'] = $baseUrl;
@@ -136,8 +133,7 @@  discard block
 block discarded – undo
136 133
         file_put_contents($siteConfigPath . '/config.yaml', Yaml::dump($siteConfig));
137 134
     }
138 135
 
139
-    protected function initializeRepository(string $className, int $storagePid)
140
-    {
136
+    protected function initializeRepository(string $className, int $storagePid) {
141 137
         $repository = $this->objectManager->get($className);
142 138
 
143 139
         $querySettings = $this->objectManager->get(Typo3QuerySettings::class);
@@ -147,8 +143,7 @@  discard block
 block discarded – undo
147 143
         return $repository;
148 144
     }
149 145
 
150
-    protected function importSolrDocuments(Solr $solr, string $path)
151
-    {
146
+    protected function importSolrDocuments(Solr $solr, string $path) {
152 147
         $jsonDocuments = json_decode(file_get_contents($path), true);
153 148
 
154 149
         $updateQuery = $solr->service->createUpdate();
Please login to merge, or discard this patch.
Tests/Functional/Api/OaiPmhTest.php 1 patch
Braces   +14 added lines, -28 removed lines patch added patch discarded remove patch
@@ -12,8 +12,7 @@  discard block
 block discarded – undo
12 12
 use SimpleXMLElement;
13 13
 use TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager;
14 14
 
15
-class OaiPmhTest extends FunctionalTestCase
16
-{
15
+class OaiPmhTest extends FunctionalTestCase {
17 16
     protected $disableJsonWrappedResponse = true;
18 17
 
19 18
     protected $coreExtensionsToLoad = [
@@ -53,8 +52,7 @@  discard block
 block discarded – undo
53 52
         $this->setUpOaiSolr();
54 53
     }
55 54
 
56
-    protected function setUpOaiSolr()
57
-    {
55
+    protected function setUpOaiSolr() {
58 56
         // Setup Solr only once for all tests in this suite
59 57
         static $solr = null;
60 58
 
@@ -74,8 +72,7 @@  discard block
 block discarded – undo
74 72
     /**
75 73
      * @test
76 74
      */
77
-    public function correctlyRespondsOnBadVerb()
78
-    {
75
+    public function correctlyRespondsOnBadVerb() {
79 76
         $client = new HttpClient();
80 77
         $response = $client->get($this->baseUrl, [
81 78
             'query' => [
@@ -100,8 +97,7 @@  discard block
 block discarded – undo
100 97
     /**
101 98
      * @test
102 99
      */
103
-    public function canIdentify()
104
-    {
100
+    public function canIdentify() {
105 101
         $oai = Endpoint::build($this->oaiUrl);
106 102
         $identity = $oai->identify();
107 103
 
@@ -114,8 +110,7 @@  discard block
 block discarded – undo
114 110
     /**
115 111
      * @test
116 112
      */
117
-    public function identifyGivesFallbackDatestampWhenNoDocuments()
118
-    {
113
+    public function identifyGivesFallbackDatestampWhenNoDocuments() {
119 114
         $oai = Endpoint::build($this->oaiUrlNoStoragePid);
120 115
         $identity = $oai->identify();
121 116
 
@@ -125,8 +120,7 @@  discard block
 block discarded – undo
125 120
     /**
126 121
      * @test
127 122
      */
128
-    public function canListMetadataFormats()
129
-    {
123
+    public function canListMetadataFormats() {
130 124
         $oai = Endpoint::build($this->oaiUrl);
131 125
         $formats = $oai->listMetadataFormats();
132 126
 
@@ -141,8 +135,7 @@  discard block
 block discarded – undo
141 135
     /**
142 136
      * @test
143 137
      */
144
-    public function canListRecords()
145
-    {
138
+    public function canListRecords() {
146 139
         $oai = Endpoint::build($this->oaiUrl);
147 140
         $result = $oai->listRecords('mets');
148 141
 
@@ -155,8 +148,7 @@  discard block
 block discarded – undo
155 148
     /**
156 149
      * @test
157 150
      */
158
-    public function noRecordsUntil1900()
159
-    {
151
+    public function noRecordsUntil1900() {
160 152
         $this->expectException(OaipmhException::class);
161 153
         $this->expectExceptionMessage('empty list');
162 154
 
@@ -169,8 +161,7 @@  discard block
 block discarded – undo
169 161
     /**
170 162
      * @test
171 163
      */
172
-    public function canUseResumptionToken()
173
-    {
164
+    public function canUseResumptionToken() {
174 165
         // NOTE: cursor and expirationDate are optional by the specification,
175 166
         //       but we include them in our implementation
176 167
 
@@ -228,8 +219,7 @@  discard block
 block discarded – undo
228 219
     /**
229 220
      * @test
230 221
      */
231
-    public function noResumptionTokenForCompleteList()
232
-    {
222
+    public function noResumptionTokenForCompleteList() {
233 223
         $client = new HttpClient();
234 224
 
235 225
         foreach (['ListIdentifiers', 'ListRecords'] as $verb) {
@@ -251,8 +241,7 @@  discard block
 block discarded – undo
251 241
     /**
252 242
      * @test
253 243
      */
254
-    public function canListAndResumeIdentifiers()
255
-    {
244
+    public function canListAndResumeIdentifiers() {
256 245
         $oai = Endpoint::build($this->oaiUrl);
257 246
         $result = $oai->listIdentifiers('mets');
258 247
 
@@ -265,18 +254,15 @@  discard block
 block discarded – undo
265 254
         $this->assertEquals('oai:de:slub-dresden:db:id-476248086', $record->identifier);
266 255
     }
267 256
 
268
-    protected function parseUtc(string $dateTime)
269
-    {
257
+    protected function parseUtc(string $dateTime) {
270 258
         return DateTime::createFromFormat('Y-m-d\TH:i:s\Z', $dateTime);
271 259
     }
272 260
 
273
-    protected function assertUtcDateString(string $dateTime)
274
-    {
261
+    protected function assertUtcDateString(string $dateTime) {
275 262
         $this->assertInstanceOf(DateTime::class, $this->parseUtc($dateTime));
276 263
     }
277 264
 
278
-    protected function assertInFuture(string $dateTime)
279
-    {
265
+    protected function assertInFuture(string $dateTime) {
280 266
         $this->assertGreaterThan(new DateTime(), $this->parseUtc($dateTime));
281 267
     }
282 268
 }
Please login to merge, or discard this patch.
Tests/Functional/Common/SolrIndexingTest.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -16,8 +16,7 @@  discard block
 block discarded – undo
16 16
 use TYPO3\CMS\Extbase\Object\ObjectManager;
17 17
 use TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager;
18 18
 
19
-class SolrIndexingTest extends FunctionalTestCase
20
-{
19
+class SolrIndexingTest extends FunctionalTestCase {
21 20
     /** @var PersistenceManager */
22 21
     protected $persistenceManager;
23 22
 
@@ -51,8 +50,7 @@  discard block
 block discarded – undo
51 50
     /**
52 51
      * @test
53 52
      */
54
-    public function canCreateCore()
55
-    {
53
+    public function canCreateCore() {
56 54
         $coreName = uniqid('testCore');
57 55
         $solr = Solr::getInstance($coreName);
58 56
         $this->assertNull($solr->core);
@@ -67,8 +65,7 @@  discard block
 block discarded – undo
67 65
     /**
68 66
      * @test
69 67
      */
70
-    public function canIndexAndSearchDocument()
71
-    {
68
+    public function canIndexAndSearchDocument() {
72 69
         $core = $this->createSolrCore();
73 70
 
74 71
         $document = $this->documentRepository->findByUid(1001);
@@ -108,8 +105,7 @@  discard block
 block discarded – undo
108 105
     /**
109 106
      * @test
110 107
      */
111
-    public function canSearchInCollections()
112
-    {
108
+    public function canSearchInCollections() {
113 109
         $core = $this->createSolrCore();
114 110
 
115 111
         $this->importDataSet(__DIR__ . '/../../Fixtures/Common/documents_fulltext.xml');
Please login to merge, or discard this patch.