예제 #1
0
 public function testFilterCallbackLike()
 {
     $field = 'field';
     $row = [$field => 'beginning_filter_target_end'];
     $filterValueSuccess = new \Zend_Db_Expr('%filter_target%');
     $filterValueFailure = new \Zend_Db_Expr('%not_found_in_the_row%');
     $this->assertTrue($this->model->filterCallbackLike($field, $filterValueSuccess, $row));
     $this->assertFalse($this->model->filterCallbackLike($field, $filterValueFailure, $row));
 }
예제 #2
0
 /**
  * @param $field
  * @param $filterValue
  * @param $row
  * @param $expected
  *
  * @dataProvider testFilterCallbackLikeDataProvider
  */
 public function testFilterCallbackLike($field, $filterValue, $row, $expected)
 {
     $filterValue = new \Zend_Db_Expr($filterValue);
     $this->assertEquals($expected, $this->model->filterCallbackLike($field, $filterValue, $row));
 }