You are here

public function PhpunitCompatibilityTraitTest::testGetMock in Drupal 8

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));
}