You are here

public function CommentStatisticsUnitTest::testRead in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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 101
Contains \Drupal\Tests\comment\Unit\CommentStatisticsUnitTest.

Class

CommentStatisticsUnitTest
@coversDefaultClass \Drupal\comment\CommentStatistics @group comment

Namespace

Drupal\Tests\comment\Unit

Code

public function testRead() {
  $this->calls_to_fetch = 0;
  $results = $this->commentStatistics
    ->read(array(
    '1' => 'boo',
    '2' => 'foo',
  ), 'snafoos');
  $this
    ->assertEquals($results, array(
    'something',
    'something-else',
  ));
}