public function CommentStatisticsUnitTest::testRead in Drupal 9
Same name and namespace in other branches
- 8 core/modules/comment/tests/src/Unit/CommentStatisticsUnitTest.php \Drupal\Tests\comment\Unit\CommentStatisticsUnitTest::testRead()
Tests the read method.
@group Drupal @group Comment
See also
\Drupal\comment\CommentStatistics::read()
File
- core/
modules/ comment/ tests/ src/ Unit/ CommentStatisticsUnitTest.php, line 97
Class
- CommentStatisticsUnitTest
- @coversDefaultClass \Drupal\comment\CommentStatistics @group comment
Namespace
Drupal\Tests\comment\UnitCode
public function testRead() {
$this->calls_to_fetch = 0;
$results = $this->commentStatistics
->read([
'1' => 'boo',
'2' => 'foo',
], 'snafus');
$this
->assertEquals([
'something',
'something-else',
], $results);
}