Passed
Pull Request — master (#123)
by
unknown
05:05
created
Tests/Functional/ViewHelpers/JsFooterViewHelperTest.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,8 +20,7 @@
 block discarded – undo
20 20
 /**
21 21
  * @covers JsFooterViewHelper
22 22
  */
23
-class JsFooterViewHelperTest extends FunctionalTestCase
24
-{
23
+class JsFooterViewHelperTest extends FunctionalTestCase {
25 24
     /**
26 25
      * @var bool Speed up this test case, it needs no database
27 26
      */
Please login to merge, or discard this patch.
Tests/Functional/ViewHelpers/MetadataWrapVariableViewHelperTest.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,8 +18,7 @@
 block discarded – undo
18 18
 /**
19 19
  * @covers MetadataWrapVariableViewHelper
20 20
  */
21
-class MetadataWrapVariableViewHelperTest extends FunctionalTestCase
22
-{
21
+class MetadataWrapVariableViewHelperTest extends FunctionalTestCase {
23 22
     /**
24 23
      * @var bool Speed up this test case, it needs no database
25 24
      */
Please login to merge, or discard this patch.
Tests/Functional/ViewHelpers/StdWrapViewHelperTest.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,8 +18,7 @@
 block discarded – undo
18 18
 /**
19 19
  * @covers StdWrapViewHelper
20 20
  */
21
-class StdWrapViewHelperTest extends FunctionalTestCase
22
-{
21
+class StdWrapViewHelperTest extends FunctionalTestCase {
23 22
     /**
24 23
      * @var bool Speed up this test case, it needs no database
25 24
      */
Please login to merge, or discard this patch.
Tests/Functional/Common/HelperTest.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -15,8 +15,7 @@  discard block
 block discarded – undo
15 15
 use Kitodo\Dlf\Common\Helper;
16 16
 use Kitodo\Dlf\Tests\Functional\FunctionalTestCase;
17 17
 
18
-class HelperTest extends FunctionalTestCase
19
-{
18
+class HelperTest extends FunctionalTestCase {
20 19
     public function setUp(): void
21 20
     {
22 21
         parent::setUp();
@@ -28,8 +27,7 @@  discard block
 block discarded – undo
28 27
     /**
29 28
      * @test
30 29
      */
31
-    public function canGetIndexNameFromUid()
32
-    {
30
+    public function canGetIndexNameFromUid() {
33 31
         // Repeat to make sure caching isn't broken
34 32
         for ($n = 0; $n < 2; $n++) {
35 33
             // Good UID, no PID
@@ -78,8 +76,7 @@  discard block
 block discarded – undo
78 76
      * @test
79 77
      * @group getLanguageName
80 78
      */
81
-    public function canTranslateLanguageNameToEnglish()
82
-    {
79
+    public function canTranslateLanguageNameToEnglish() {
83 80
         // NOTE: This only tests in BE mode
84 81
 
85 82
         $this->initLanguageService('default');
@@ -93,8 +90,7 @@  discard block
 block discarded – undo
93 90
      * @test
94 91
      * @group getLanguageName
95 92
      */
96
-    public function canTranslateLanguageNameToGerman()
97
-    {
93
+    public function canTranslateLanguageNameToGerman() {
98 94
         // NOTE: This only tests in BE mode
99 95
 
100 96
         $this->initLanguageService('de');
Please login to merge, or discard this patch.
Tests/Functional/Common/IiifUrlReaderTest.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -15,14 +15,12 @@
 block discarded – undo
15 15
 use Kitodo\Dlf\Common\IiifUrlReader;
16 16
 use Kitodo\Dlf\Tests\Functional\FunctionalTestCase;
17 17
 
18
-class IiifUrlReaderTest extends FunctionalTestCase
19
-{
18
+class IiifUrlReaderTest extends FunctionalTestCase {
20 19
     /**
21 20
      * @test
22 21
      * @group getContent
23 22
      */
24
-    public function getContentCheck()
25
-    {
23
+    public function getContentCheck() {
26 24
         $iiifUrlReader = new IiifUrlReader();
27 25
 
28 26
         $correctUrl = 'http://web:8001/Tests/Fixtures/Common/correct.txt';
Please login to merge, or discard this patch.
Tests/Functional/Common/SolrSearchTest.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -18,8 +18,7 @@  discard block
 block discarded – undo
18 18
 use Kitodo\Dlf\Domain\Repository\SolrCoreRepository;
19 19
 use Kitodo\Dlf\Tests\Functional\FunctionalTestCase;
20 20
 
21
-class SolrSearchTest extends FunctionalTestCase
22
-{
21
+class SolrSearchTest extends FunctionalTestCase {
23 22
     private static array $databaseFixtures = [
24 23
         __DIR__ . '/../../Fixtures/Common/solrcores.csv'
25 24
     ];
@@ -41,8 +40,7 @@  discard block
 block discarded – undo
41 40
     /**
42 41
      * @test
43 42
      */
44
-    public function canPrepareAndSubmit()
45
-    {
43
+    public function canPrepareAndSubmit() {
46 44
         $documentRepository = $this->initializeRepository(DocumentRepository::class, 0);
47 45
         $solrCoreName = $this->solrCoreRepository->findByUid(5)->getIndexName();
48 46
         $settings = ['solrcore' => $solrCoreName, 'storagePid' => 0];
@@ -80,8 +78,7 @@  discard block
 block discarded – undo
80 78
         $this->initializeRepository(DocumentRepository::class, 0);
81 79
     }
82 80
 
83
-    protected function setUpSolr($uid, $storagePid, $solrFixtures)
84
-    {
81
+    protected function setUpSolr($uid, $storagePid, $solrFixtures) {
85 82
         $this->solrCoreRepository = $this->initializeRepository(SolrCoreRepository::class, $storagePid);
86 83
 
87 84
         // Setup Solr only once for all tests in this suite
Please login to merge, or discard this patch.
Tests/Functional/Common/SolrIndexingTest.php 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -23,8 +23,7 @@  discard block
 block discarded – undo
23 23
 use TYPO3\CMS\Core\Core\Bootstrap;
24 24
 use TYPO3\CMS\Core\Utility\GeneralUtility;
25 25
 
26
-class SolrIndexingTest extends FunctionalTestCase
27
-{
26
+class SolrIndexingTest extends FunctionalTestCase {
28 27
     /** @var CollectionRepository */
29 28
     protected $collectionRepository;
30 29
 
@@ -53,8 +52,7 @@  discard block
 block discarded – undo
53 52
     /**
54 53
      * @test
55 54
      */
56
-    public function canCreateCore()
57
-    {
55
+    public function canCreateCore() {
58 56
         $coreName = uniqid('testCore');
59 57
         $solr = Solr::getInstance($coreName);
60 58
         self::assertNull($solr->core);
@@ -69,8 +67,7 @@  discard block
 block discarded – undo
69 67
     /**
70 68
      * @test
71 69
      */
72
-    public function canIndexAndSearchDocument()
73
-    {
70
+    public function canIndexAndSearchDocument() {
74 71
         $core = $this->createSolrCore();
75 72
 
76 73
         $document = $this->documentRepository->findByUid(1001);
@@ -124,8 +121,7 @@  discard block
 block discarded – undo
124 121
     /**
125 122
      * @test
126 123
      */
127
-    public function canSearchInCollections()
128
-    {
124
+    public function canSearchInCollections() {
129 125
         $core = $this->createSolrCore();
130 126
 
131 127
         $this->importCSVDataSet(__DIR__ . '/../../Fixtures/Common/documents_fulltext.csv');
@@ -165,8 +161,7 @@  discard block
 block discarded – undo
165 161
     /**
166 162
      * @test
167 163
      */
168
-    public function canGetIndexFieldName()
169
-    {
164
+    public function canGetIndexFieldName() {
170 165
         $this->assertEquals('title_usi', Indexer::getIndexFieldName('title', 20000));
171 166
         $this->assertEquals('year_uuu', Indexer::getIndexFieldName('year', 20000));
172 167
         $this->assertEquals('', Indexer::getIndexFieldName('title'));
Please login to merge, or discard this patch.
Tests/Functional/Common/SolrSearchQueryTest.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -18,8 +18,7 @@  discard block
 block discarded – undo
18 18
 use Kitodo\Dlf\Domain\Repository\SolrCoreRepository;
19 19
 use Kitodo\Dlf\Tests\Functional\FunctionalTestCase;
20 20
 
21
-class SolrSearchQueryTest extends FunctionalTestCase
22
-{
21
+class SolrSearchQueryTest extends FunctionalTestCase {
23 22
     private $solrCoreRepository;
24 23
 
25 24
     private static array $databaseFixtures = [
@@ -43,8 +42,7 @@  discard block
 block discarded – undo
43 42
      * @test
44 43
      * @ignore
45 44
      */
46
-    public function canExecute()
47
-    {
45
+    public function canExecute() {
48 46
         $documentRepository = $this->initializeRepository(DocumentRepository::class, 0);
49 47
         $settings = ['solrcore' => 4, 'storagePid' => 0];
50 48
 
@@ -68,8 +66,7 @@  discard block
 block discarded – undo
68 66
         $this->initializeRepository(DocumentRepository::class, 0);
69 67
     }
70 68
 
71
-    protected function setUpSolr($uid, $storagePid, $solrFixtures)
72
-    {
69
+    protected function setUpSolr($uid, $storagePid, $solrFixtures) {
73 70
         $this->solrCoreRepository = $this->initializeRepository(SolrCoreRepository::class, $storagePid);
74 71
 
75 72
         // Setup Solr only once for all tests in this suite
Please login to merge, or discard this patch.
Tests/Functional/Common/SolrTest.php 1 patch
Braces   +7 added lines, -14 removed lines patch added patch discarded remove patch
@@ -17,8 +17,7 @@  discard block
 block discarded – undo
17 17
 use Kitodo\Dlf\Domain\Repository\SolrCoreRepository;
18 18
 use Kitodo\Dlf\Tests\Functional\FunctionalTestCase;
19 19
 
20
-class SolrTest extends FunctionalTestCase
21
-{
20
+class SolrTest extends FunctionalTestCase {
22 21
 
23 22
     private static array $databaseFixtures = [
24 23
         __DIR__ . '/../../Fixtures/Common/documents_1.csv',
@@ -33,8 +32,7 @@  discard block
 block discarded – undo
33 32
     /**
34 33
      * @test
35 34
      */
36
-    public function canCreateCore()
37
-    {
35
+    public function canCreateCore() {
38 36
         $this->assertEquals('newCoreName', Solr::createCore('newCoreName'));
39 37
         $this->assertEquals('newCoreName', Solr::getInstance('newCoreName')->core);
40 38
     }
@@ -42,8 +40,7 @@  discard block
 block discarded – undo
42 40
     /**
43 41
      * @test
44 42
      */
45
-    public function canEscapeQuery()
46
-    {
43
+    public function canEscapeQuery() {
47 44
         $query1 = Solr::escapeQuery('"custom query with special characters: "testvalue"\n"');
48 45
         $this->assertEquals('"custom query with special characters\: "testvalue"\\\\n"', $query1);
49 46
 
@@ -54,8 +51,7 @@  discard block
 block discarded – undo
54 51
     /**
55 52
      * @test
56 53
      */
57
-    public function canEscapeQueryKeepField()
58
-    {
54
+    public function canEscapeQueryKeepField() {
59 55
         $query1 = Solr::escapeQueryKeepField('abc_uui:(abc)', 0);
60 56
         $this->assertEquals('abc_uui\:(abc)', $query1);
61 57
     }
@@ -63,8 +59,7 @@  discard block
 block discarded – undo
63 59
     /**
64 60
      * @test
65 61
      */
66
-    public function canGetNextCoreNumber()
67
-    {
62
+    public function canGetNextCoreNumber() {
68 63
         $this->assertEquals(5, Solr::getNextCoreNumber());
69 64
         $this->assertEquals(5, Solr::getNextCoreNumber());
70 65
         Solr::createCore();
@@ -74,8 +69,7 @@  discard block
 block discarded – undo
74 69
     /**
75 70
      * @test
76 71
      */
77
-    public function canSearchRaw()
78
-    {
72
+    public function canSearchRaw() {
79 73
         $this->setUpData(self::$databaseFixtures);
80 74
         $solr = $this->setUpSolr(4, 0, self::$solrFixtures);
81 75
         $resultSet = $solr->searchRaw(['core' => 4, 'collection' => 1]);
@@ -92,8 +86,7 @@  discard block
 block discarded – undo
92 86
         $this->initializeRepository(DocumentRepository::class, 0);
93 87
     }
94 88
 
95
-    protected function setUpSolr($uid, $storagePid, $solrFixtures)
96
-    {
89
+    protected function setUpSolr($uid, $storagePid, $solrFixtures) {
97 90
         $solrCoreRepository = $this->initializeRepository(SolrCoreRepository::class, $storagePid);
98 91
 
99 92
         // Setup Solr only once for all tests in this suite
Please login to merge, or discard this patch.