File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed
app/code/Magento/Catalog/Model/ProductLink
dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/Product Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change 10
10
11
11
use Magento \Catalog \Api \Data \ProductInterface ;
12
12
13
- /** Returns collection of product visible in catalog by search key */
13
+ /**
14
+ * Returns collection of product visible in catalog by search key
15
+ */
14
16
class Search
15
17
{
16
18
/**
Original file line number Diff line number Diff line change @@ -57,6 +57,20 @@ public function testExecuteNotVisibleIndividuallyProducts() : void
57
57
->setPostValue ('limit ' , 50 );
58
58
$ this ->dispatch ('backend/catalog/product/search ' );
59
59
$ responseBody = $ this ->getResponse ()->getBody ();
60
- $ this ->assertContains ('{"options":[],"total":0} ' , $ responseBody );
60
+ $ this ->assertContains ('"total":1} ' , $ responseBody );
61
+ }
62
+
63
+ /**
64
+ * @magentoDataFixture Magento/Catalog/_files/multiple_mixed_products.php
65
+ */
66
+ public function testExecuteEnabledAndDisabledProducts () : void
67
+ {
68
+ $ this ->getRequest ()
69
+ ->setPostValue ('searchKey ' , 'simple ' )
70
+ ->setPostValue ('page ' , 1 )
71
+ ->setPostValue ('limit ' , 50 );
72
+ $ this ->dispatch ('backend/catalog/product/search ' );
73
+ $ responseBody = $ this ->getResponse ()->getBody ();
74
+ $ this ->assertContains ('"total":3} ' , $ responseBody );
61
75
}
62
76
}
You can’t perform that action at this time.
0 commit comments