function PhpunitCompatibilityTraitTest::testGetMock

Tests that getMock is available.

@covers ::getMock @group legacy @expectedDeprecation \Drupal\Tests\PhpunitCompatibilityTrait::getMock() is deprecated in drupal:8.5.0 and is removed from drupal:9.0.0. Use \Drupal\Tests\PhpunitCompatibilityTrait::createMock() instead. See https://www.drupal.org/node/2907725

File

core/tests/Drupal/Tests/PhpunitCompatibilityTraitTest.php, line 22

Class

PhpunitCompatibilityTraitTest
Tests the PHPUnit forward compatibility trait.

Namespace

Drupal\Tests

Code

public function testGetMock() {
    $this->assertInstanceOf('\\Drupal\\Tests\\MockTestClassInterface', $this->getMock(MockTestClassInterface::class));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.