File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
app/code/Magento/Review/Model/Resource
dev/tests/integration/testsuite/Magento/Review/Model/Resource/Review Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -338,7 +338,7 @@ public function aggregate($object)
338
338
* Aggregate review summary
339
339
*
340
340
* @param \Magento\Framework\Model\AbstractModel $object
341
- * @param \Magento\Framework\Data\Collection\Db $ratingSummaryObject
341
+ * @param \Magento\Review\Model\Rating $ratingSummaryObject
342
342
* @return void
343
343
*/
344
344
protected function aggregateReviewSummary ($ object , $ ratingSummaryObject )
Original file line number Diff line number Diff line change @@ -21,9 +21,9 @@ class ReviewTest extends \PHPUnit_Framework_TestCase
21
21
protected $ reviewResource ;
22
22
23
23
/**
24
- * @var \Magento\Review\Model\Review
24
+ * @var \Magento\Review\Model\Resource\ Review\Collection
25
25
*/
26
- protected $ review ;
26
+ protected $ reviewCollection ;
27
27
28
28
/**
29
29
* @var \Magento\Framework\App\Resource
@@ -43,7 +43,7 @@ protected function setUp()
43
43
$ this ->objectManager = \Magento \TestFramework \Helper \Bootstrap::getObjectManager ();
44
44
$ this ->resource = $ this ->objectManager ->get ('Magento\Framework\App\Resource ' );
45
45
$ this ->adapter = $ this ->resource ->getConnection ('core_read ' );
46
- $ this ->review = $ this ->objectManager ->create ('Magento\Review\Model\Review ' );
46
+ $ this ->reviewCollection = $ this ->objectManager ->create ('Magento\Review\Model\Resource\ Review\Collection ' );
47
47
$ this ->reviewResource = $ this ->objectManager ->create ('Magento\Review\Model\Resource\Review ' );
48
48
}
49
49
@@ -52,7 +52,7 @@ protected function setUp()
52
52
*/
53
53
public function testAggregate ()
54
54
{
55
- $ rating = $ this ->review -> getCollection () ->getFirstItem ();
55
+ $ rating = $ this ->reviewCollection ->getFirstItem ();
56
56
$ this ->reviewResource ->aggregate ($ rating );
57
57
58
58
$ select = $ this ->adapter ->select ()->from ($ this ->resource ->getTableName ('review_entity_summary ' ));
You can’t perform that action at this time.
0 commit comments