From 8d8d4e5e7ae6658536410e881213b62a0b09ed68 Mon Sep 17 00:00:00 2001 From: catch <catch56@gmail.com> Date: Fri, 21 Oct 2022 11:24:10 +0100 Subject: [PATCH] Issue #3316129 by mondrake: Fix AssertContentTraitTest PHPStan-0 issues --- core/phpstan-baseline.neon | 65 ------------------- .../Core/Test/AssertContentTraitTest.php | 2 +- 2 files changed, 1 insertion(+), 66 deletions(-) diff --git a/core/phpstan-baseline.neon b/core/phpstan-baseline.neon index 967e8324ef58..af6f6c745d20 100644 --- a/core/phpstan-baseline.neon +++ b/core/phpstan-baseline.neon @@ -1644,68 +1644,3 @@ parameters: message: "#^\\#pre_render callback '\\\\\\\\Drupal\\\\\\\\Tests\\\\\\\\Core…' at key '0' is not trusted\\.$#" count: 1 path: tests/Drupal/Tests/Core/Render/RendererCallbackTest.php - - - - message: "#^Call to an undefined method Drupal\\\\Tests\\\\Core\\\\Test\\\\TestClass\\:\\:assertArrayHasKey\\(\\)\\.$#" - count: 3 - path: tests/Drupal/Tests/Core/Test/AssertContentTraitTest.php - - - - message: "#^Call to an undefined method Drupal\\\\Tests\\\\Core\\\\Test\\\\TestClass\\:\\:assertDoesNotMatchRegularExpression\\(\\)\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Test/AssertContentTraitTest.php - - - - message: "#^Call to an undefined method Drupal\\\\Tests\\\\Core\\\\Test\\\\TestClass\\:\\:assertEmpty\\(\\)\\.$#" - count: 6 - path: tests/Drupal/Tests/Core/Test/AssertContentTraitTest.php - - - - message: "#^Call to an undefined method Drupal\\\\Tests\\\\Core\\\\Test\\\\TestClass\\:\\:assertEquals\\(\\)\\.$#" - count: 2 - path: tests/Drupal/Tests/Core/Test/AssertContentTraitTest.php - - - - message: "#^Call to an undefined method Drupal\\\\Tests\\\\Core\\\\Test\\\\TestClass\\:\\:assertMatchesRegularExpression\\(\\)\\.$#" - count: 2 - path: tests/Drupal/Tests/Core/Test/AssertContentTraitTest.php - - - - message: "#^Call to an undefined method Drupal\\\\Tests\\\\Core\\\\Test\\\\TestClass\\:\\:assertNotEmpty\\(\\)\\.$#" - count: 10 - path: tests/Drupal/Tests/Core/Test/AssertContentTraitTest.php - - - - message: "#^Call to an undefined method Drupal\\\\Tests\\\\Core\\\\Test\\\\TestClass\\:\\:assertNotEquals\\(\\)\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Test/AssertContentTraitTest.php - - - - message: "#^Call to an undefined method Drupal\\\\Tests\\\\Core\\\\Test\\\\TestClass\\:\\:assertNotFalse\\(\\)\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Test/AssertContentTraitTest.php - - - - message: "#^Call to an undefined method Drupal\\\\Tests\\\\Core\\\\Test\\\\TestClass\\:\\:assertSame\\(\\)\\.$#" - count: 1 - path: tests/Drupal/Tests/Core/Test/AssertContentTraitTest.php - - - - message: "#^Call to an undefined method Drupal\\\\Tests\\\\Core\\\\Test\\\\TestClass\\:\\:assertStringContainsString\\(\\)\\.$#" - count: 3 - path: tests/Drupal/Tests/Core/Test/AssertContentTraitTest.php - - - - message: "#^Call to an undefined method Drupal\\\\Tests\\\\Core\\\\Test\\\\TestClass\\:\\:assertStringNotContainsString\\(\\)\\.$#" - count: 3 - path: tests/Drupal/Tests/Core/Test/AssertContentTraitTest.php - - - - message: "#^Call to an undefined method Drupal\\\\Tests\\\\Core\\\\Test\\\\TestClass\\:\\:assertTrue\\(\\)\\.$#" - count: 6 - path: tests/Drupal/Tests/Core/Test/AssertContentTraitTest.php - - - - message: "#^Call to an undefined method Drupal\\\\Tests\\\\Core\\\\Test\\\\TestClass\\:\\:fail\\(\\)\\.$#" - count: 3 - path: tests/Drupal/Tests/Core/Test/AssertContentTraitTest.php diff --git a/core/tests/Drupal/Tests/Core/Test/AssertContentTraitTest.php b/core/tests/Drupal/Tests/Core/Test/AssertContentTraitTest.php index 3bc362b328da..017b60712dea 100644 --- a/core/tests/Drupal/Tests/Core/Test/AssertContentTraitTest.php +++ b/core/tests/Drupal/Tests/Core/Test/AssertContentTraitTest.php @@ -35,7 +35,7 @@ public function testGetTextContent() { } -class TestClass { +class TestClass extends UnitTestCase { use AssertContentTrait; public function _setRawContent($content) { -- GitLab