You are here

public function UniqueTest::testUniqueWithMultipleValues in Tamper 8

Tests unique with multiple values.

File

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

Class

UniqueTest
Test the unique plugin.

Namespace

Drupal\Tests\tamper\Unit\Plugin\Tamper

Code

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