Пример #1
0
 /**
  * Negative test
  */
 public function testGetFilterNegativeApply()
 {
     $this->applierMock->expects($this->never())->method('apply')->willReturn(true);
     $this->appliersPoolMock->expects($this->once())->method('getApplier')->willReturn($this->applierMock);
     $mapper = new FilterMapper($this->appliersPoolMock, $this->braintreeSearchAdapterMock);
     $result = $mapper->getFilter('orderId', []);
     $this->assertEquals(null, $result);
 }
 /**
  * @inheritdoc
  */
 public function addFieldToFilter($field, $condition)
 {
     if (is_array($field)) {
         return $this;
     }
     if (!is_array($condition)) {
         $condition = ['eq' => $condition];
     }
     $this->addFilterToList($this->filterMapper->getFilter($field, $condition));
     return $this;
 }