You are here

public function ArrayFilterTest::testArrayFilterWithMultipleValues in Tamper 8

Test the array filter plugin with a multiple values.

File

tests/src/Unit/Plugin/Tamper/ArrayFilterTest.php, line 35

Class

ArrayFilterTest
Tests the array filter plugin.

Namespace

Drupal\Tests\tamper\Unit\Plugin\Tamper

Code

public function testArrayFilterWithMultipleValues() {
  $original = [
    'foo',
    0,
    '',
    'bar',
    FALSE,
    'baz',
    [],
    'zip',
  ];
  $expected = [
    'foo',
    'bar',
    'baz',
    'zip',
  ];
  $this
    ->assertArrayEquals($expected, $this->plugin
    ->tamper($original));
}