protected function EmbedPreviewTest::assertMatch in Embed 8
Asserts that at least one item in an array matches a predicate.
Parameters
array $items: The items to test.
callable $predicate: The predicate against which to test the items.
1 call to EmbedPreviewTest::assertMatch()
- EmbedPreviewTest::testPreview in tests/
src/ Functional/ EmbedPreviewTest.php  - Tests that out-of-band assets are included with previews.
 
File
- tests/
src/ Functional/ EmbedPreviewTest.php, line 86  
Class
- EmbedPreviewTest
 - Tests Embed's preview functionality.
 
Namespace
Drupal\Tests\embed\FunctionalCode
protected function assertMatch(array $items, callable $predicate) {
  $items = array_filter($items, $predicate);
  $this
    ->assertNotEmpty($items);
}