Skip to content

Commit 30ef797

Browse files
committed
#11522: Fix Filter Customer Report Review
- Integration test added
1 parent 3413f3e commit 30ef797

File tree

2 files changed

+36
-41
lines changed
  • app/code/Magento/Reports/Test/Unit/Model/ResourceModel/Report/Review/Customer
  • dev/tests/integration/testsuite/Magento/Reports/Model/ResourceModel/Review/Customer

2 files changed

+36
-41
lines changed

app/code/Magento/Reports/Test/Unit/Model/ResourceModel/Report/Review/Customer/CollectionTest.php

Lines changed: 0 additions & 41 deletions
This file was deleted.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
namespace Magento\Reports\Model\ResourceModel\Review\Product;
7+
8+
/**
9+
* @magentoAppArea adminhtml
10+
*/
11+
class CollectionTest extends \PHPUnit\Framework\TestCase
12+
{
13+
/**
14+
* @var \Magento\Reports\Model\ResourceModel\Review\Customer\Collection
15+
*/
16+
private $collection;
17+
18+
protected function setUp()
19+
{
20+
$this->collection = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
21+
\Magento\Reports\Model\ResourceModel\Review\Customer\Collection::class
22+
);
23+
}
24+
25+
/**
26+
* This tests covers issue described in:
27+
* https://github.com/magento/magento2/issues/10301
28+
*
29+
* @magentoDataFixture Magento/Review/_files/customer_review.php
30+
*/
31+
public function testSelectCountSql()
32+
{
33+
$this->collection->addFieldToFilter('customer_name', ['like' => '%john%']);
34+
$this->assertEquals(1, $this->collection->getSize());
35+
}
36+
}

0 commit comments

Comments
 (0)