You are here

public function SplitFilterTest::testFilterDelete in Configuration Split 8

Test that the filter deletes correctly.

File

src/Tests/SplitFilterTest.php, line 393

Class

SplitFilterTest
Test filter plugin.

Namespace

Drupal\config_split\Tests

Code

public function testFilterDelete() {
  $storage = $this
    ->prophesize(StorageInterface::class);
  $storage
    ->exists('Yes')
    ->willReturn(TRUE);
  $storage
    ->delete('Yes')
    ->willReturn(TRUE);
  $transparent = $this
    ->getFilter(NULL);
  $filter = $this
    ->getFilter($storage
    ->reveal());
  $this
    ->assertTrue($transparent
    ->filterDelete('Yes', TRUE));
  $this
    ->assertFalse($transparent
    ->filterDelete('No', FALSE));
  $this
    ->assertTrue($filter
    ->filterDelete('Yes', TRUE));
  $this
    ->assertFalse($filter
    ->filterDelete('No', FALSE));
}