-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #64 from LionsAd/fix-kernel-test-base
Issue #50: Support KernelTestBase tests natively.
- Loading branch information
Showing
4 changed files
with
52 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
tests/drupal-8/drupal_ti_test/tests/src/Kernel/DrupalTiTestTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?php | ||
|
||
/** | ||
* @file | ||
* Contains \Drupal\Tests\drupal_ti_test\Kernel\DrupalTiTestTest; | ||
*/ | ||
|
||
namespace Drupal\Tests\drupal_ti_test\Kernel; | ||
|
||
use Drupal\drupal_ti_test\DrupalTiTest; | ||
use Drupal\KernelTests\KernelTestBase; | ||
|
||
/** | ||
* @coversDefaultClass \Drupal\drupal_ti_test\DrupalTiTest | ||
* | ||
* @group drupal_ti_test | ||
*/ | ||
class DrupalTiTestTest extends KernelTestBase { | ||
|
||
/** | ||
* Modules to enable. | ||
* | ||
* @var array | ||
*/ | ||
public static $modules = ['system', 'user', 'drupal_ti_test']; | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
protected function setUp() { | ||
parent::setUp(); | ||
|
||
// Do something with the database. | ||
$this->installSchema('system', 'router'); | ||
} | ||
|
||
/** | ||
* @covers ::bar | ||
*/ | ||
public function testKernelTestBase() { | ||
$test = new DrupalTiTest(); | ||
$this->assertEquals('foo', $test->bar()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters