public function EntityCollectorTest::testCollect in Simple OAuth (OAuth2) & OpenID Connect 8.4
Same name and namespace in other branches
- 8.2 tests/src/Unit/EntityCollectorTest.php \Drupal\Tests\simple_oauth\Unit\EntityCollectorTest::testCollect()
- 8.3 tests/src/Unit/EntityCollectorTest.php \Drupal\Tests\simple_oauth\Unit\EntityCollectorTest::testCollect()
- 5.x tests/src/Unit/EntityCollectorTest.php \Drupal\Tests\simple_oauth\Unit\EntityCollectorTest::testCollect()
@covers ::collect
File
- tests/
src/ Unit/ EntityCollectorTest.php, line 24
Class
- EntityCollectorTest
- @coversDefaultClass \Drupal\simple_oauth\ExpiredCollector @group simple_oauth
Namespace
Drupal\Tests\simple_oauth\UnitCode
public function testCollect() {
list($expired_collector, $query, ) = $this
->buildProphecies();
$query
->condition('expire', 42, '<')
->shouldBeCalledTimes(1);
$this
->assertArrayEquals([
1,
52,
], array_map(function ($entity) {
return $entity
->id();
}, $expired_collector
->collect()));
}