File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed
dev/tests/integration/testsuite/Magento/CheckoutAgreements/Model/ResourceModel/Grid Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * Copyright © Magento, Inc. All rights reserved.
4
+ * See COPYING.txt for license details.
5
+ */
6
+ declare (strict_types=1 );
7
+
8
+ namespace Magento \CheckoutAgreements \Model \ResourceModel \Grid ;
9
+
10
+ use Magento \CheckoutAgreements \Model \ResourceModel \Agreement \Grid \Collection ;
11
+ use Magento \TestFramework \Helper \Bootstrap ;
12
+
13
+ /**
14
+ * Check data in collection
15
+ */
16
+ class CollectionTest extends \PHPUnit \Framework \TestCase
17
+ {
18
+ /**
19
+ * @var Collection;
20
+ */
21
+ private $ collection ;
22
+
23
+ /**
24
+ * @inheritdoc
25
+ */
26
+ public function setUp ()
27
+ {
28
+ $ this ->collection = Bootstrap::getObjectManager ()
29
+ ->create (Collection::class);
30
+ }
31
+
32
+ /**
33
+ * Check that collection is filterable by store
34
+ *
35
+ * @magentoDataFixture Magento/CheckoutAgreements/_files/multi_agreements_active_with_text.php
36
+ */
37
+ public function testAddStoresToFilter (): void
38
+ {
39
+ $ collectionSize = $ this ->collection ->addStoreFilter (1 )
40
+ ->load (false , false )
41
+ ->getSize ();
42
+ $ this ->assertEquals (2 , $ collectionSize );
43
+ }
44
+ }
You can’t perform that action at this time.
0 commit comments