Further Drupal 8.6.4 changes. Some core files were not committed before a commit...
[yaffs-website] / web / core / modules / ban / tests / src / Kernel / Migrate / d7 / MigrateBlockedIPsTest.php
1 <?php
2
3 namespace Drupal\Tests\ban\Kernel\Migrate\d7;
4
5 use Drupal\Tests\SchemaCheckTestTrait;
6 use Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase;
7
8 /**
9  * Migrate blocked IPs.
10  *
11  * @group ban
12  */
13 class MigrateBlockedIPsTest extends MigrateDrupal7TestBase {
14
15   use SchemaCheckTestTrait;
16
17   /**
18    * Modules to enable.
19    *
20    * @var array
21    */
22   public static $modules = ['ban'];
23
24   /**
25    * {@inheritdoc}
26    */
27   protected function setUp() {
28     parent::setUp();
29     $this->installSchema('ban', ['ban_ip']);
30     $this->executeMigration('d7_blocked_ips');
31   }
32
33   /**
34    * Tests migration of blocked IPs.
35    */
36   public function testBlockedIPs() {
37     $this->assertTrue(\Drupal::service('ban.ip_manager')->isBanned('111.111.111.111'));
38   }
39
40 }