You are here

public function SeekTest::testSeek in GraphQL 8.4

@covers \Drupal\graphql\Plugin\GraphQL\DataProducer\Utility\Seek::resolve

@dataProvider testSeekProvider

Parameters

array $input: The test list to seek in.

int $position: The position in the list to retrieve.

mixed $expected: The expected result returned by the data producer.

File

tests/src/Kernel/DataProducer/SeekTest.php, line 26

Class

SeekTest
Data producers Seek test class.

Namespace

Drupal\Tests\graphql\Kernel\DataProducer

Code

public function testSeek(array $input, int $position, $expected) : void {
  $result = $this
    ->executeDataProducer('seek', [
    'input' => $input,
    'position' => $position,
  ]);
  $this
    ->assertEquals($expected, $result);
}