File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed
lib/internal/Magento/Framework/Data/Test/Unit/Collection Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+ /***
3
+ * Copyright © 2015 Magento. All rights reserved.
4
+ * See COPYING.txt for license details.
5
+ */
6
+
7
+ namespace Magento \Framework \Data \Test \Unit \Collection ;
8
+
9
+ class FilesystemTest extends \PHPUnit_Framework_TestCase
10
+ {
11
+ /** @var \Magento\Framework\Data\Collection\Filesystem */
12
+ private $ model ;
13
+
14
+ public function setUp ()
15
+ {
16
+ $ objectManager = new \Magento \Framework \TestFramework \Unit \Helper \ObjectManager ($ this );
17
+ $ this ->model = $ objectManager ->getObject ('Magento\Framework\Data\Collection\Filesystem ' );
18
+ }
19
+
20
+ public function testFilterCallbackLike ()
21
+ {
22
+ $ field = 'field ' ;
23
+ $ row = [$ field => 'beginning_filter_target_end ' ,];
24
+ $ filterValueSuccess = new \Zend_Db_Expr ('%filter_target% ' );
25
+ $ filterValueFailure = new \Zend_Db_Expr ('%not_found_in_the_row% ' );
26
+
27
+ $ this ->assertTrue ($ this ->model ->filterCallbackLike ($ field , $ filterValueSuccess , $ row ));
28
+ $ this ->assertFalse ($ this ->model ->filterCallbackLike ($ field , $ filterValueFailure , $ row ));
29
+ }
30
+ }
You can’t perform that action at this time.
0 commit comments