comparison core/modules/simpletest/tests/src/Kernel/TestDiscoveryDeprecationTest.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents
children
comparison
equal deleted inserted replaced
16:c2387f117808 17:129ea1e6d783
1 <?php
2
3 namespace Drupal\Tests\simpletest\Kernel;
4
5 use Drupal\KernelTests\KernelTestBase;
6
7 /**
8 * @group simpletest
9 * @group legacy
10 *
11 * @coversDefaultClass \Drupal\simpletest\TestDiscovery
12 */
13 class TestDiscoveryDeprecationTest extends KernelTestBase {
14
15 /**
16 * {@inheritdoc}
17 */
18 public static $modules = ['simpletest', 'simpletest_deprecation_test'];
19
20 /**
21 * @expectedDeprecation The deprecated alter hook hook_simpletest_alter() is implemented in these functions: simpletest_deprecation_test_simpletest_alter. Convert your test to a PHPUnit-based one and implement test listeners. See: https://www.drupal.org/node/2939892
22 * @covers ::getTestClasses
23 */
24 public function testHookSimpletestAlter() {
25 // The simpletest_test module implements hook_simpletest_alter(), which
26 // should trigger a deprecation error during getTestClasses().
27 $this->assertNotEmpty(
28 $this->container->get('test_discovery')->getTestClasses()
29 );
30 }
31
32 }