diff --git a/app/cdash/include/Test/BuildDiffForTesting.php b/app/cdash/include/Test/BuildDiffForTesting.php index f90e13e5f3..e249f8d408 100644 --- a/app/cdash/include/Test/BuildDiffForTesting.php +++ b/app/cdash/include/Test/BuildDiffForTesting.php @@ -81,7 +81,7 @@ protected function createMockBuildWithDiff($diff) { /** @var Build|PHPUnit_Framework_MockObject_MockObject $build */ $build = $this->getMockBuilder(Build::class) - ->setMethods(['GetErrorDifferences', 'GetPreviousBuildId']) + ->onlyMethods(['GetErrorDifferences', 'GetPreviousBuildId']) ->getMock(); $build->expects($this->any()) diff --git a/app/cdash/include/Test/CDashUseCaseTestCase.php b/app/cdash/include/Test/CDashUseCaseTestCase.php index 5565eea062..5bc68252ba 100644 --- a/app/cdash/include/Test/CDashUseCaseTestCase.php +++ b/app/cdash/include/Test/CDashUseCaseTestCase.php @@ -28,7 +28,7 @@ public function setUseCaseModelFactory(UseCase $useCase) $mockServiceContainer = $this->getMockBuilder(ServiceContainer::class) ->disableOriginalConstructor() - ->setMethods(['create']) + ->onlyMethods(['create']) ->getMock(); $mockServiceContainer diff --git a/app/cdash/tests/case/CDash/Api/GitHubWebhookTest.php b/app/cdash/tests/case/CDash/Api/GitHubWebhookTest.php index c97796ed6b..8c6b82f1a9 100644 --- a/app/cdash/tests/case/CDash/Api/GitHubWebhookTest.php +++ b/app/cdash/tests/case/CDash/Api/GitHubWebhookTest.php @@ -28,7 +28,7 @@ public function setUp() : void $this->mock_system = $this->getMockBuilder(System::class) ->disableOriginalConstructor() - ->setMethods(['system_exit']) + ->onlyMethods(['system_exit']) ->getMock(); $container->set(System::class, $this->mock_system); diff --git a/app/cdash/tests/case/CDash/Lib/Repository/GitHubTest.php b/app/cdash/tests/case/CDash/Lib/Repository/GitHubTest.php index df9a00854c..304fbd4e31 100644 --- a/app/cdash/tests/case/CDash/Lib/Repository/GitHubTest.php +++ b/app/cdash/tests/case/CDash/Lib/Repository/GitHubTest.php @@ -297,7 +297,7 @@ private function setupAuthentication() $client = $this->getMockBuilder(\Github\Client::class) ->disableOriginalConstructor() - ->setMethods(['api', 'authenticate', 'getHttpClient']) + ->onlyMethods(['api', 'authenticate', 'getHttpClient']) ->getMock(); $client->expects($this->any()) ->method('authenticate'); diff --git a/app/cdash/tests/case/CDash/Messaging/Subscription/CommitAuthorSubscriptionBuilderTest.php b/app/cdash/tests/case/CDash/Messaging/Subscription/CommitAuthorSubscriptionBuilderTest.php index 9b657de7b9..32e7bb5394 100644 --- a/app/cdash/tests/case/CDash/Messaging/Subscription/CommitAuthorSubscriptionBuilderTest.php +++ b/app/cdash/tests/case/CDash/Messaging/Subscription/CommitAuthorSubscriptionBuilderTest.php @@ -113,7 +113,7 @@ public function getMockSubmission($key, $handler_class) /** @var BuildGroup|PHPUnit_Framework_MockObject_MockObject $mock_group */ $mock_group = $this->getMockBuilder(BuildGroup::class) ->disableOriginalConstructor() - ->setMethods(['isNotifyingCommitters']) + ->onlyMethods(['isNotifyingCommitters']) ->getMock(); $mock_group->expects($this->any()) @@ -123,7 +123,7 @@ public function getMockSubmission($key, $handler_class) /** @var ActionableBuildInterface|PHPUnit_Framework_MockObject_MockObject $mock_handler */ $mock_handler = $this->getMockBuilder($handler_class) ->disableOriginalConstructor() - ->setMethods(['GetProject', 'GetSite', 'GetBuildCollection', 'GetCommitAuthors', 'GetBuildGroup', 'GetTopicCollectionForSubscriber']) + ->onlyMethods(['GetProject', 'GetSite', 'GetBuildCollection', 'GetCommitAuthors', 'GetBuildGroup', 'GetTopicCollectionForSubscriber']) ->getMock(); $mock_handler->expects($this->any()) diff --git a/app/cdash/tests/case/CDash/Messaging/Subscription/UserSubscriptionBuilderTest.php b/app/cdash/tests/case/CDash/Messaging/Subscription/UserSubscriptionBuilderTest.php index 9c3030c60c..03ef48cf63 100644 --- a/app/cdash/tests/case/CDash/Messaging/Subscription/UserSubscriptionBuilderTest.php +++ b/app/cdash/tests/case/CDash/Messaging/Subscription/UserSubscriptionBuilderTest.php @@ -69,7 +69,7 @@ private function getMockHandler(BuildCollection $builds) ->getMockForAbstractClass(); $mock_project = $this->getMockBuilder(Project::class) - ->setMethods(['GetSubscriberCollection']) + ->onlyMethods(['GetSubscriberCollection']) ->getMock(); $mock_project->expects($this->any()) diff --git a/app/cdash/tests/case/CDash/Messaging/Topic/AuthoredTopicTest.php b/app/cdash/tests/case/CDash/Messaging/Topic/AuthoredTopicTest.php index 5b70e84a9a..f0534e2731 100644 --- a/app/cdash/tests/case/CDash/Messaging/Topic/AuthoredTopicTest.php +++ b/app/cdash/tests/case/CDash/Messaging/Topic/AuthoredTopicTest.php @@ -39,7 +39,7 @@ public function testSubscribesToBuild() /** @var Build|PHPUnit_Framework_MockObject_MockObject $build */ $build = $this->getMockBuilder(Build::class) - ->setMethods(['GetCommitAuthors']) + ->onlyMethods(['GetCommitAuthors']) ->getMock(); $build->expects($this->exactly(2)) diff --git a/app/cdash/tests/case/CDash/Messaging/Topic/BuildErrorTopicTest.php b/app/cdash/tests/case/CDash/Messaging/Topic/BuildErrorTopicTest.php index 7aa0d4dd14..2b2a35f8ef 100644 --- a/app/cdash/tests/case/CDash/Messaging/Topic/BuildErrorTopicTest.php +++ b/app/cdash/tests/case/CDash/Messaging/Topic/BuildErrorTopicTest.php @@ -173,7 +173,7 @@ public function testHasFixes() /** @var Build|PHPUnit_Framework_MockObject_MockObject $build */ $build = $this->getMockBuilder(Build::class) - ->setMethods(['GetErrorDifferences']) + ->onlyMethods(['GetErrorDifferences']) ->getMock(); $build->expects($this->never()) @@ -185,7 +185,7 @@ public function testHasFixes() $this->assertFalse($sut->hasFixes()); $build = $this->getMockBuilder(Build::class) - ->setMethods(['GetErrorDifferences', 'GetPreviousBuildId']) + ->onlyMethods(['GetErrorDifferences', 'GetPreviousBuildId']) ->getMock(); $build->expects($this->once()) diff --git a/app/cdash/tests/case/CDash/Messaging/Topic/MissingTestTopicTest.php b/app/cdash/tests/case/CDash/Messaging/Topic/MissingTestTopicTest.php index ac664b46eb..6f8efe6c51 100644 --- a/app/cdash/tests/case/CDash/Messaging/Topic/MissingTestTopicTest.php +++ b/app/cdash/tests/case/CDash/Messaging/Topic/MissingTestTopicTest.php @@ -27,7 +27,7 @@ public function testSubscribesToBuild() /** @var Build|PHPUnit_Framework_MockObject_MockObject $build1 */ $build1 = $this->getMockBuilder(Build::class) - ->setMethods(['GetMissingTests']) + ->onlyMethods(['GetMissingTests']) ->getMock(); $build1->expects($this->once()) @@ -39,7 +39,7 @@ public function testSubscribesToBuild() /** @var Build|PHPUnit_Framework_MockObject_MockObject $build2 */ $build2 = $this->getMockBuilder(Build::class) - ->setMethods(['GetMissingTests']) + ->onlyMethods(['GetMissingTests']) ->getMock(); $build2->expects($this->once()) @@ -86,7 +86,7 @@ public function testSetTopicData() /** @var Build|PHPUnit_Framework_MockObject_MockObject $build2 */ $build2 = $this->getMockBuilder(Build::class) - ->setMethods(['GetMissingTests']) + ->onlyMethods(['GetMissingTests']) ->getMock(); $build2->expects($this->any()) diff --git a/app/cdash/tests/case/CDash/Messaging/Topic/TestFailureTopicTest.php b/app/cdash/tests/case/CDash/Messaging/Topic/TestFailureTopicTest.php index dea16fe340..428c028967 100644 --- a/app/cdash/tests/case/CDash/Messaging/Topic/TestFailureTopicTest.php +++ b/app/cdash/tests/case/CDash/Messaging/Topic/TestFailureTopicTest.php @@ -320,7 +320,7 @@ public function testSubscribesToRedundantBuild() $diff = $this->createNew('testfailedpositive'); $diff['testfailedpositive'] = 0; $build = $this->getMockBuilder(Build::class) - ->setMethods(['GetErrorDifferences', 'GetPreviousBuildId', 'GetNumberOfFailedTests']) + ->onlyMethods(['GetErrorDifferences', 'GetPreviousBuildId', 'GetNumberOfFailedTests']) ->getMock(); $build->expects($this->any()) ->method('GetErrorDifferences') diff --git a/app/cdash/tests/case/CDash/Model/BuildFailureTest.php b/app/cdash/tests/case/CDash/Model/BuildFailureTest.php index 63775cee1b..6655cb87d4 100644 --- a/app/cdash/tests/case/CDash/Model/BuildFailureTest.php +++ b/app/cdash/tests/case/CDash/Model/BuildFailureTest.php @@ -24,7 +24,7 @@ public function setUp() : void $container = ServiceContainer::container(); $this->mock_buildfailure = $this->getMockBuilder(BuildFailure::class) ->disableOriginalConstructor() - ->setMethods(['GetBuildFailureArguments']) + ->onlyMethods(['GetBuildFailureArguments']) ->getMock(); $this->mock_project = $this->getMockBuilder(Project::class) ->disableOriginalConstructor() diff --git a/app/cdash/tests/case/CDash/Model/BuildRelationshipTest.php b/app/cdash/tests/case/CDash/Model/BuildRelationshipTest.php index f7c2aa8dd3..311ae9e9f8 100644 --- a/app/cdash/tests/case/CDash/Model/BuildRelationshipTest.php +++ b/app/cdash/tests/case/CDash/Model/BuildRelationshipTest.php @@ -29,7 +29,7 @@ public function setUp() : void $this->mock_build1 = $this->getMockBuilder(Build::class) ->disableOriginalConstructor() - ->setMethods(['Exists', 'FillFromId']) + ->onlyMethods(['Exists', 'FillFromId']) ->getMock(); $this->mock_build1->Id = 1; $this->mock_build1->ProjectId = 1; @@ -37,7 +37,7 @@ public function setUp() : void $this->mock_build2 = $this->getMockBuilder(Build::class) ->disableOriginalConstructor() - ->setMethods(['Exists', 'FillFromId']) + ->onlyMethods(['Exists', 'FillFromId']) ->getMock(); $this->mock_build2->Id = 2; $this->mock_build2->ProjectId = 1; diff --git a/app/cdash/tests/case/CDash/Model/BuildTest.php b/app/cdash/tests/case/CDash/Model/BuildTest.php index 1ef3c87b1c..59a1e43236 100644 --- a/app/cdash/tests/case/CDash/Model/BuildTest.php +++ b/app/cdash/tests/case/CDash/Model/BuildTest.php @@ -41,7 +41,7 @@ public function testGetBuildEmailCollection() // TODO: refactor asap /** @var Build|PHPUnit_Framework_MockObject_MockObject $sut */ $sut = $this->getMockBuilder(Build::class) - ->setMethods(['GetErrorDifferences', 'GetPreviousBuildId']) + ->onlyMethods(['GetErrorDifferences', 'GetPreviousBuildId']) ->getMock(); $sut->Id = 1; $sut->expects($this->once()) diff --git a/app/cdash/tests/case/CDash/Model/PendingSubmissionsTest.php b/app/cdash/tests/case/CDash/Model/PendingSubmissionsTest.php index c56225cd4c..3d16243da1 100644 --- a/app/cdash/tests/case/CDash/Model/PendingSubmissionsTest.php +++ b/app/cdash/tests/case/CDash/Model/PendingSubmissionsTest.php @@ -29,7 +29,7 @@ public function setUp() : void $this->mock_build = $this->getMockBuilder(Build::class) ->disableOriginalConstructor() - ->setMethods(['Exists', 'FillFromId']) + ->onlyMethods(['Exists', 'FillFromId']) ->getMock(); $this->mock_build->Id = 1; $this->mock_build->ProjectId = 1; diff --git a/app/cdash/tests/case/CDash/Model/RepositoryTest.php b/app/cdash/tests/case/CDash/Model/RepositoryTest.php index ad495240d1..715e997734 100644 --- a/app/cdash/tests/case/CDash/Model/RepositoryTest.php +++ b/app/cdash/tests/case/CDash/Model/RepositoryTest.php @@ -30,7 +30,7 @@ public function setUp() : void $this->project = $this->getMockBuilder(Project::class) ->disableOriginalConstructor() - ->setMethods(['GetRepositories']) + ->onlyMethods(['GetRepositories']) ->getMock(); $this->project->CvsViewerType = Repository::VIEWER_GITHUB; diff --git a/app/cdash/tests/case/CDash/ServiceContainerTest.php b/app/cdash/tests/case/CDash/ServiceContainerTest.php index 5c8f116fa0..fa29ea9473 100644 --- a/app/cdash/tests/case/CDash/ServiceContainerTest.php +++ b/app/cdash/tests/case/CDash/ServiceContainerTest.php @@ -44,7 +44,7 @@ public function testCreate() { $mock_di = $this->getMockBuilder(DI\Container::class) ->disableOriginalConstructor() - ->setMethods(['make']) + ->onlyMethods(['make']) ->getMock(); $mock_di @@ -61,7 +61,7 @@ public function testGet() { $mock_di = $this->getMockBuilder(DI\Container::class) ->disableOriginalConstructor() - ->setMethods(['get']) + ->onlyMethods(['get']) ->getMock(); $mock_di diff --git a/app/cdash/tests/case/CDash/Submission/CommitAuthorHandlerTraitTest.php b/app/cdash/tests/case/CDash/Submission/CommitAuthorHandlerTraitTest.php index 792c575676..6409f2d382 100644 --- a/app/cdash/tests/case/CDash/Submission/CommitAuthorHandlerTraitTest.php +++ b/app/cdash/tests/case/CDash/Submission/CommitAuthorHandlerTraitTest.php @@ -10,12 +10,12 @@ public function testGetCommitAuthors() { $has_errors = $this->getMockBuilder(Build::class) ->disableOriginalConstructor() - ->setMethods(['GetCommitAuthors']) + ->onlyMethods(['GetCommitAuthors']) ->getMock(); $has_warnings = $this->getMockBuilder(Build::class) ->disableOriginalConstructor() - ->setMethods(['GetCommitAuthors']) + ->onlyMethods(['GetCommitAuthors']) ->getMock(); $has_errors->expects($this->once()) diff --git a/app/cdash/tests/case/CDash/XmlHandler/UpdateHandlerTest.php b/app/cdash/tests/case/CDash/XmlHandler/UpdateHandlerTest.php index 04c7c4e59d..f3b9a60394 100644 --- a/app/cdash/tests/case/CDash/XmlHandler/UpdateHandlerTest.php +++ b/app/cdash/tests/case/CDash/XmlHandler/UpdateHandlerTest.php @@ -37,7 +37,7 @@ public function testUpdateHandlerIsACommitAuthorHandler() public function testGetCommitAuthors() { $build = $this->getMockBuilder(Build::class) - ->setMethods(['GetCommitAuthors']) + ->onlyMethods(['GetCommitAuthors']) ->disableOriginalConstructor() ->getMock(); diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index ce9c78d48e..a3c2d6d848 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -12511,7 +12511,7 @@ parameters: #^Call to deprecated method setMethods\\(\\) of class PHPUnit\\\\Framework\\\\MockObject\\\\MockBuilder\\: https\\://github\\.com/sebastianbergmann/phpunit/pull/3687$# """ - count: 2 + count: 1 path: app/cdash/include/Test/CDashUseCaseTestCase.php - @@ -16188,14 +16188,6 @@ parameters: count: 2 path: app/cdash/tests/case/CDash/Api/GitHubWebhookTest.php - - - message: """ - #^Call to deprecated method setMethods\\(\\) of class PHPUnit\\\\Framework\\\\MockObject\\\\MockBuilder\\: - https\\://github\\.com/sebastianbergmann/phpunit/pull/3687$# - """ - count: 1 - path: app/cdash/tests/case/CDash/Api/GitHubWebhookTest.php - - message: "#^Dynamic call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertEquals\\(\\)\\.$#" count: 3 @@ -16560,7 +16552,7 @@ parameters: #^Call to deprecated method setMethods\\(\\) of class PHPUnit\\\\Framework\\\\MockObject\\\\MockBuilder\\: https\\://github\\.com/sebastianbergmann/phpunit/pull/3687$# """ - count: 4 + count: 3 path: app/cdash/tests/case/CDash/Lib/Repository/GitHubTest.php - @@ -16696,14 +16688,6 @@ parameters: count: 2 path: app/cdash/tests/case/CDash/Messaging/Subscription/CommitAuthorSubscriptionBuilderTest.php - - - message: """ - #^Call to deprecated method setMethods\\(\\) of class PHPUnit\\\\Framework\\\\MockObject\\\\MockBuilder\\: - https\\://github\\.com/sebastianbergmann/phpunit/pull/3687$# - """ - count: 3 - path: app/cdash/tests/case/CDash/Messaging/Subscription/CommitAuthorSubscriptionBuilderTest.php - - message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#" count: 2 @@ -16924,14 +16908,6 @@ parameters: count: 4 path: app/cdash/tests/case/CDash/Messaging/Subscription/UserSubscriptionBuilderTest.php - - - message: """ - #^Call to deprecated method setMethods\\(\\) of class PHPUnit\\\\Framework\\\\MockObject\\\\MockBuilder\\: - https\\://github\\.com/sebastianbergmann/phpunit/pull/3687$# - """ - count: 2 - path: app/cdash/tests/case/CDash/Messaging/Subscription/UserSubscriptionBuilderTest.php - - message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#" count: 2 @@ -17047,14 +17023,6 @@ parameters: count: 1 path: app/cdash/tests/case/CDash/Messaging/Subscription/UserSubscriptionBuilderTest.php - - - message: """ - #^Call to deprecated method setMethods\\(\\) of class PHPUnit\\\\Framework\\\\MockObject\\\\MockBuilder\\: - https\\://github\\.com/sebastianbergmann/phpunit/pull/3687$# - """ - count: 1 - path: app/cdash/tests/case/CDash/Messaging/Topic/AuthoredTopicTest.php - - message: "#^Call to method expects\\(\\) on an unknown class PHPUnit_Framework_MockObject_MockObject\\.$#" count: 1 @@ -17100,14 +17068,6 @@ parameters: count: 4 path: app/cdash/tests/case/CDash/Messaging/Topic/BuildErrorTopicTest.php - - - message: """ - #^Call to deprecated method setMethods\\(\\) of class PHPUnit\\\\Framework\\\\MockObject\\\\MockBuilder\\: - https\\://github\\.com/sebastianbergmann/phpunit/pull/3687$# - """ - count: 3 - path: app/cdash/tests/case/CDash/Messaging/Topic/BuildErrorTopicTest.php - - message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#" count: 2 @@ -17478,14 +17438,6 @@ parameters: count: 2 path: app/cdash/tests/case/CDash/Messaging/Topic/FixedTopicTest.php - - - message: """ - #^Call to deprecated method setMethods\\(\\) of class PHPUnit\\\\Framework\\\\MockObject\\\\MockBuilder\\: - https\\://github\\.com/sebastianbergmann/phpunit/pull/3687$# - """ - count: 1 - path: app/cdash/tests/case/CDash/Messaging/Topic/FixedTopicTest.php - - message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#" count: 2 @@ -17606,14 +17558,6 @@ parameters: count: 6 path: app/cdash/tests/case/CDash/Messaging/Topic/MissingTestTopicTest.php - - - message: """ - #^Call to deprecated method setMethods\\(\\) of class PHPUnit\\\\Framework\\\\MockObject\\\\MockBuilder\\: - https\\://github\\.com/sebastianbergmann/phpunit/pull/3687$# - """ - count: 3 - path: app/cdash/tests/case/CDash/Messaging/Topic/MissingTestTopicTest.php - - message: "#^Call to method expects\\(\\) on an unknown class PHPUnit_Framework_MockObject_MockObject\\.$#" count: 3 @@ -17704,14 +17648,6 @@ parameters: count: 2 path: app/cdash/tests/case/CDash/Messaging/Topic/TestFailureTopicTest.php - - - message: """ - #^Call to deprecated method setMethods\\(\\) of class PHPUnit\\\\Framework\\\\MockObject\\\\MockBuilder\\: - https\\://github\\.com/sebastianbergmann/phpunit/pull/3687$# - """ - count: 2 - path: app/cdash/tests/case/CDash/Messaging/Topic/TestFailureTopicTest.php - - message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#" count: 2 @@ -17967,14 +17903,6 @@ parameters: count: 2 path: app/cdash/tests/case/CDash/Messaging/Topic/UpdateErrorTopicTest.php - - - message: """ - #^Call to deprecated method setMethods\\(\\) of class PHPUnit\\\\Framework\\\\MockObject\\\\MockBuilder\\: - https\\://github\\.com/sebastianbergmann/phpunit/pull/3687$# - """ - count: 1 - path: app/cdash/tests/case/CDash/Messaging/Topic/UpdateErrorTopicTest.php - - message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#" count: 2 @@ -18223,14 +18151,6 @@ parameters: count: 3 path: app/cdash/tests/case/CDash/Model/BuildFailureTest.php - - - message: """ - #^Call to deprecated method setMethods\\(\\) of class PHPUnit\\\\Framework\\\\MockObject\\\\MockBuilder\\: - https\\://github\\.com/sebastianbergmann/phpunit/pull/3687$# - """ - count: 1 - path: app/cdash/tests/case/CDash/Model/BuildFailureTest.php - - message: "#^Dynamic call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertEquals\\(\\)\\.$#" count: 1 @@ -18276,14 +18196,6 @@ parameters: count: 1 path: app/cdash/tests/case/CDash/Model/BuildRelationshipTest.php - - - message: """ - #^Call to deprecated method setMethods\\(\\) of class PHPUnit\\\\Framework\\\\MockObject\\\\MockBuilder\\: - https\\://github\\.com/sebastianbergmann/phpunit/pull/3687$# - """ - count: 2 - path: app/cdash/tests/case/CDash/Model/BuildRelationshipTest.php - - message: "#^Dynamic call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertEquals\\(\\)\\.$#" count: 11 @@ -18329,14 +18241,6 @@ parameters: count: 2 path: app/cdash/tests/case/CDash/Model/BuildTest.php - - - message: """ - #^Call to deprecated method setMethods\\(\\) of class PHPUnit\\\\Framework\\\\MockObject\\\\MockBuilder\\: - https\\://github\\.com/sebastianbergmann/phpunit/pull/3687$# - """ - count: 1 - path: app/cdash/tests/case/CDash/Model/BuildTest.php - - message: "#^Call to method GetDiffWithPreviousBuild\\(\\) on an unknown class PHPUnit_Framework_MockObject_MockObject\\.$#" count: 1 @@ -18442,14 +18346,6 @@ parameters: count: 14 path: app/cdash/tests/case/CDash/Model/PendingSubmissionsTest.php - - - message: """ - #^Call to deprecated method setMethods\\(\\) of class PHPUnit\\\\Framework\\\\MockObject\\\\MockBuilder\\: - https\\://github\\.com/sebastianbergmann/phpunit/pull/3687$# - """ - count: 1 - path: app/cdash/tests/case/CDash/Model/PendingSubmissionsTest.php - - message: "#^Dynamic call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertEquals\\(\\)\\.$#" count: 8 @@ -18460,14 +18356,6 @@ parameters: count: 1 path: app/cdash/tests/case/CDash/Model/PendingSubmissionsTest.php - - - message: """ - #^Call to deprecated method setMethods\\(\\) of class PHPUnit\\\\Framework\\\\MockObject\\\\MockBuilder\\: - https\\://github\\.com/sebastianbergmann/phpunit/pull/3687$# - """ - count: 1 - path: app/cdash/tests/case/CDash/Model/RepositoryTest.php - - message: "#^Call to method getInstallationId\\(\\) on an unknown class CDash\\\\Model\\\\RepositoryInterface\\.$#" count: 1 @@ -18716,14 +18604,6 @@ parameters: count: 1 path: app/cdash/tests/case/CDash/Service/RepositoryServiceTest.php - - - message: """ - #^Call to deprecated method setMethods\\(\\) of class PHPUnit\\\\Framework\\\\MockObject\\\\MockBuilder\\: - https\\://github\\.com/sebastianbergmann/phpunit/pull/3687$# - """ - count: 2 - path: app/cdash/tests/case/CDash/ServiceContainerTest.php - - message: "#^Dynamic call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\)\\.$#" count: 1 @@ -18769,14 +18649,6 @@ parameters: count: 1 path: app/cdash/tests/case/CDash/ServiceContainerTest.php - - - message: """ - #^Call to deprecated method setMethods\\(\\) of class PHPUnit\\\\Framework\\\\MockObject\\\\MockBuilder\\: - https\\://github\\.com/sebastianbergmann/phpunit/pull/3687$# - """ - count: 2 - path: app/cdash/tests/case/CDash/Submission/CommitAuthorHandlerTraitTest.php - - message: "#^Dynamic call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertContains\\(\\)\\.$#" count: 3 @@ -19237,14 +19109,6 @@ parameters: count: 1 path: app/cdash/tests/case/CDash/XmlHandler/TestingHandlerTest.php - - - message: """ - #^Call to deprecated method setMethods\\(\\) of class PHPUnit\\\\Framework\\\\MockObject\\\\MockBuilder\\: - https\\://github\\.com/sebastianbergmann/phpunit/pull/3687$# - """ - count: 1 - path: app/cdash/tests/case/CDash/XmlHandler/UpdateHandlerTest.php - - message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\) with 'CDash\\\\\\\\Submission\\\\\\\\CommitAuthorHandlerInterface' and UpdateHandler will always evaluate to true\\.$#" count: 1 @@ -30017,14 +29881,6 @@ parameters: count: 1 path: tests/Feature/PasswordRotation.php - - - message: """ - #^Call to deprecated method setMethods\\(\\) of class PHPUnit\\\\Framework\\\\MockObject\\\\MockBuilder\\: - https\\://github\\.com/sebastianbergmann/phpunit/pull/3687$# - """ - count: 1 - path: tests/Feature/ProjectPermissions.php - - message: "#^Property Tests\\\\Feature\\\\ProjectPermissions\\:\\:\\$mock_system has no type specified\\.$#" count: 1 diff --git a/tests/Feature/ProjectPermissions.php b/tests/Feature/ProjectPermissions.php index 0caae43e09..84ddb3e624 100644 --- a/tests/Feature/ProjectPermissions.php +++ b/tests/Feature/ProjectPermissions.php @@ -40,7 +40,7 @@ protected function setUp(): void $container = ServiceContainer::container(); $this->mock_system = $this->getMockBuilder(System::class) ->disableOriginalConstructor() - ->setMethods(['system_exit']) + ->onlyMethods(['system_exit']) ->getMock(); $container->set(System::class, $this->mock_system); }