Mercurial > hg > cmmr2012-drupal-site
comparison core/modules/comment/tests/src/Unit/CommentStatisticsUnitTest.php @ 5:12f9dff5fda9 tip
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:34:47 +0100 |
parents | c75dbcec494b |
children |
comparison
equal
deleted
inserted
replaced
4:a9cd425dd02b | 5:12f9dff5fda9 |
---|---|
1 <?php | 1 <?php |
2 | 2 |
3 namespace Drupal\Tests\comment\Unit; | 3 namespace Drupal\Tests\comment\Unit; |
4 | 4 |
5 use Drupal\comment\CommentStatistics; | 5 use Drupal\comment\CommentStatistics; |
6 use Drupal\Core\Entity\EntityTypeManagerInterface; | |
6 use Drupal\Tests\UnitTestCase; | 7 use Drupal\Tests\UnitTestCase; |
7 | 8 |
8 /** | 9 /** |
9 * @coversDefaultClass \Drupal\comment\CommentStatistics | 10 * @coversDefaultClass \Drupal\comment\CommentStatistics |
10 * @group comment | 11 * @group comment |
80 | 81 |
81 $this->database->expects($this->once()) | 82 $this->database->expects($this->once()) |
82 ->method('select') | 83 ->method('select') |
83 ->will($this->returnValue($this->select)); | 84 ->will($this->returnValue($this->select)); |
84 | 85 |
85 $this->commentStatistics = new CommentStatistics($this->database, $this->getMock('Drupal\Core\Session\AccountInterface'), $this->getMock('Drupal\Core\Entity\EntityManagerInterface'), $this->getMock('Drupal\Core\State\StateInterface')); | 86 $this->commentStatistics = new CommentStatistics($this->database, $this->getMock('Drupal\Core\Session\AccountInterface'), $this->createMock(EntityTypeManagerInterface::class), $this->getMock('Drupal\Core\State\StateInterface'), $this->database); |
86 } | 87 } |
87 | 88 |
88 /** | 89 /** |
89 * Tests the read method. | 90 * Tests the read method. |
90 * | 91 * |