Commit 48dc6d6a authored by Chris Burschka's avatar Chris Burschka
Browse files

Code cleanup: Fix type inspection for Drupal 9.

parent 6da717d9
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -113,11 +113,10 @@ class FileLogRotationTest extends FileLogTestBase {
    /** @var \Drupal\Core\Config\ConfigFactoryInterface $configFactory */
    $configFactory = $this->getConfigFactoryStub($configs);

    /** @var \Drupal\Core\State\StateInterface|\PHPUnit_Framework_MockObject_MockObject $state */
    /** @var \Drupal\Core\State\StateInterface|\PHPUnit\Framework\MockObject\MockObject $state */
    $state = $this->createMock(StateInterface::class);
    // InvocationMocker::with(...$arguments) incorrectly documented.
    // Suppress until phpunit/phpunit:8.2.1.
    /* @noinspection PhpParamsInspection */
    $state->method('get')
      ->with('filelog.rotation')
      ->willReturn($timestamp);
+1 −1
Original line number Diff line number Diff line
@@ -95,7 +95,7 @@ class FileLogTest extends FileLogTestBase {
      ['filelog.settings' => $config]
    );

    /** @var \Drupal\Core\State\StateInterface|\PHPUnit_Framework_MockObject_MockObject $state */
    /** @var \Drupal\Core\State\StateInterface|\PHPUnit\Framework\MockObject\MockObject $state */
    $state_data = ['filelog.rotation' => 0];
    $state = $this->createMock(StateInterface::class);
    $state->method('get')
+0 −2
Original line number Diff line number Diff line
@@ -79,7 +79,6 @@ class FileLogTokenTest extends UnitTestCase {
    // Mock the User entity type resolution.
    // InvocationMocker::with(...$arguments) incorrectly documented.
    // Suppress until phpunit/phpunit:8.2.1.
    /* @noinspection PhpParamsInspection */
    $entityTypeRepository->method('getEntityTypeFromClass')
      ->with(User::class)
      ->willReturn('user');
@@ -87,7 +86,6 @@ class FileLogTokenTest extends UnitTestCase {
    // Mock the user entity storage (actual user-loading mocked each test).
    // InvocationMocker::with(...$arguments) incorrectly documented.
    // Suppress until phpunit/phpunit:8.2.1.
    /* @noinspection PhpParamsInspection */
    $entityTypeManager->method('getStorage')
      ->with('user')
      ->willReturn($this->userStorage);