Skip to content

Commit

Permalink
Remove Config class and associated test
Browse files Browse the repository at this point in the history
  • Loading branch information
williamjallen committed May 31, 2024
1 parent aeddb3a commit 3b9e7ae
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 179 deletions.
2 changes: 1 addition & 1 deletion app/cdash/config/di.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

return [
'CDash\Controller\Auth\Session' => \DI\create()
->constructor(\DI\get('CDash\System'), \CDash\Config::getInstance()),
->constructor(\DI\get('CDash\System')),
];
33 changes: 0 additions & 33 deletions app/cdash/include/CDash/Config.php

This file was deleted.

5 changes: 1 addition & 4 deletions app/cdash/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,8 @@ set_tests_properties(/CDash/Api/GitHubWebhook PROPERTIES DEPENDS /PHPUnitTest)
add_unit_test(/CDash/BuildUseCase)
set_tests_properties(/CDash/BuildUseCase PROPERTIES DEPENDS /CDash/Api/GitHubWebhook)

add_unit_test(/CDash/Config)
set_tests_properties(/CDash/Config PROPERTIES DEPENDS /CDash/BuildUseCase)

add_unit_test(/CDash/ConfigUseCase)
set_tests_properties(/CDash/ConfigUseCase PROPERTIES DEPENDS /CDash/Config)
set_tests_properties(/CDash/ConfigUseCase PROPERTIES DEPENDS /CDash/BuildUseCase)

add_unit_test(/CDash/Database)
set_tests_properties(/CDash/Database PROPERTIES DEPENDS /CDash/ConfigUseCase)
Expand Down
28 changes: 0 additions & 28 deletions app/cdash/tests/case/CDash/ConfigTest.php

This file was deleted.

2 changes: 0 additions & 2 deletions app/cdash/tests/case/CDash/DatabaseTest.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?php

use CDash\Database;
use CDash\Config;
use CDash\Test\CDashTestCase;

class DatabaseTest extends CDashTestCase
Expand All @@ -12,7 +11,6 @@ public static function setUpBeforeClass() : void

public static function tearDownAfterClass() : void
{
Config::setInstance(Config::class, null);
Database::setInstance(Database::class, null);
parent::tearDownAfterClass();
}
Expand Down
111 changes: 0 additions & 111 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -10622,44 +10622,6 @@ parameters:
count: 1
path: app/cdash/bootstrap/cdash_autoload.php

-
message: """
#^Call to method getInstance\\(\\) of deprecated class CDash\\\\Singleton\\:
05/29/2024 Use config\\(\\) instead\\.$#
"""
count: 1
path: app/cdash/config/di.php

-
message: "#^Method CDash\\\\Config\\:\\:get\\(\\) has no return type specified\\.$#"
count: 1
path: app/cdash/include/CDash/Config.php

-
message: "#^Method CDash\\\\Config\\:\\:get\\(\\) has parameter \\$name with no type specified\\.$#"
count: 1
path: app/cdash/include/CDash/Config.php

-
message: "#^Method CDash\\\\Config\\:\\:set\\(\\) has no return type specified\\.$#"
count: 1
path: app/cdash/include/CDash/Config.php

-
message: "#^Method CDash\\\\Config\\:\\:set\\(\\) has parameter \\$name with no type specified\\.$#"
count: 1
path: app/cdash/include/CDash/Config.php

-
message: "#^Method CDash\\\\Config\\:\\:set\\(\\) has parameter \\$value with no type specified\\.$#"
count: 1
path: app/cdash/include/CDash/Config.php

-
message: "#^Property CDash\\\\Config\\:\\:\\$_config type has no value type specified in iterable type array\\.$#"
count: 1
path: app/cdash/include/CDash/Config.php

-
message: "#^Cannot call method fetch\\(\\) on PDOStatement\\|false\\.$#"
count: 1
Expand Down Expand Up @@ -15718,63 +15680,6 @@ parameters:
count: 1
path: app/cdash/tests/case/CDash/BuildUseCaseTest.php

-
message: """
#^Call to deprecated method get\\(\\) of class CDash\\\\Config\\:
09/04/2023 Use config\\(\\) instead\\.$#
"""
count: 1
path: app/cdash/tests/case/CDash/ConfigTest.php

-
message: """
#^Call to deprecated method set\\(\\) of class CDash\\\\Config\\:
09/04/2023 Use config\\(\\) instead\\.$#
"""
count: 2
path: app/cdash/tests/case/CDash/ConfigTest.php

-
message: """
#^Call to method getInstance\\(\\) of deprecated class CDash\\\\Singleton\\:
05/29/2024 Use config\\(\\) instead\\.$#
"""
count: 2
path: app/cdash/tests/case/CDash/ConfigTest.php

-
message: "#^Dynamic call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertEquals\\(\\)\\.$#"
count: 1
path: app/cdash/tests/case/CDash/ConfigTest.php

-
message: "#^Dynamic call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\)\\.$#"
count: 1
path: app/cdash/tests/case/CDash/ConfigTest.php

-
message: "#^Dynamic call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertSame\\(\\)\\.$#"
count: 1
path: app/cdash/tests/case/CDash/ConfigTest.php

-
message: """
#^Fetching class constant class of deprecated class CDash\\\\Config\\:
05/29/2024 Use config\\(\\) instead\\.$#
"""
count: 2
path: app/cdash/tests/case/CDash/ConfigTest.php

-
message: "#^Method ConfigTest\\:\\:testGetInstance\\(\\) has no return type specified\\.$#"
count: 1
path: app/cdash/tests/case/CDash/ConfigTest.php

-
message: "#^Method ConfigTest\\:\\:testGetSet\\(\\) has no return type specified\\.$#"
count: 1
path: app/cdash/tests/case/CDash/ConfigTest.php

-
message: "#^Dynamic call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertCount\\(\\)\\.$#"
count: 1
Expand Down Expand Up @@ -15856,14 +15761,6 @@ parameters:
count: 1
path: app/cdash/tests/case/CDash/DatabaseTest.php

-
message: """
#^Call to method setInstance\\(\\) of deprecated class CDash\\\\Singleton\\:
05/29/2024 Use config\\(\\) instead\\.$#
"""
count: 1
path: app/cdash/tests/case/CDash/DatabaseTest.php

-
message: "#^Dynamic call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\)\\.$#"
count: 3
Expand All @@ -15889,14 +15786,6 @@ parameters:
count: 1
path: app/cdash/tests/case/CDash/DatabaseTest.php

-
message: """
#^Fetching class constant class of deprecated class CDash\\\\Config\\:
05/29/2024 Use config\\(\\) instead\\.$#
"""
count: 1
path: app/cdash/tests/case/CDash/DatabaseTest.php

-
message: "#^Method DatabaseTest\\:\\:testExecute\\(\\) has no return type specified\\.$#"
count: 1
Expand Down

0 comments on commit 3b9e7ae

Please sign in to comment.