| Server IP : 195.130.67.5 / Your IP : 216.73.217.154 Web Server : Microsoft-IIS/10.0 System : Windows NT WEBSERVER1 10.0 build 17763 (Windows Server 2016) i586 User : IUSR ( 0) PHP Version : 7.4.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /Old Sites/enoikio/core/tests/Drupal/Tests/ |
Upload File : |
<?php
namespace Drupal\Tests;
/**
* Tests the PHPUnit forward compatibility trait.
*
* @coversDefaultClass \Drupal\Tests\PhpunitCompatibilityTrait
* @group Tests
*/
class PhpunitCompatibilityTraitTest extends UnitTestCase {
/**
* 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
*/
public function testGetMock() {
$this->assertInstanceOf('\Drupal\Tests\MockTestClassInterface', $this->getMock(MockTestClassInterface::class));
}
/**
* Tests that setExpectedException is available.
*
* @covers ::setExpectedException
* @group legacy
* @expectedDeprecation \Drupal\Tests\PhpunitCompatibilityTrait:setExpectedException() is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Backward compatibility for PHPUnit 4 will no longer be supported. See https://www.drupal.org/node/3056869
*/
public function testSetExpectedException() {
$expectedMessage = "Expected message";
$expectedCode = 100;
$this->setExpectedException(\Exception::class, $expectedMessage, $expectedCode);
throw new \Exception($expectedMessage, $expectedCode);
}
}
interface MockTestClassInterface {
}