File tree 1 file changed +41
-0
lines changed
dev/tests/integration/testsuite/Magento/CheckoutAgreements/Model/ResourceModel/Grid 1 file changed +41
-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 ()->create (Collection::class);
29
+ }
30
+
31
+ /**
32
+ * Check that collection is filterable by store
33
+ *
34
+ * @magentoDataFixture Magento/CheckoutAgreements/_files/multi_agreements_active_with_text.php
35
+ */
36
+ public function testAddStoresToFilter (): void
37
+ {
38
+ $ collectionSize = $ this ->collection ->addStoreFilter (1 )->load (false , false )->getSize ();
39
+ $ this ->assertEquals (2 , $ collectionSize );
40
+ }
41
+ }
You can’t perform that action at this time.
0 commit comments