Пример #1
0
 public function testBuildNullValueExprNoAppropriateChildBuilder()
 {
     $ds = $this->getMock('Oro\\Bundle\\FilterBundle\\Datasource\\FilterDatasourceAdapterInterface');
     $fieldName = 'o.testField';
     $filterName = 'testFilter';
     $inverse = true;
     $this->childBuilder1->expects($this->once())->method('supports')->with($this->identicalTo($ds))->will($this->returnValue(false));
     $this->childBuilder1->expects($this->never())->method('buildNullValueExpr');
     $this->setExpectedException('\\RuntimeException', sprintf('The "%s" datasource adapter is not supported.', get_class($ds)));
     $this->builder->buildNullValueExpr($ds, $fieldName, $filterName, $inverse);
 }
Пример #2
0
 /**
  * {@inheritdoc}
  */
 protected function buildNullValueExpr(FilterDatasourceAdapterInterface $ds, $comparisonType, $fieldName)
 {
     return $this->manyRelationBuilder->buildNullValueExpr($ds, $fieldName, $this->getName(), $comparisonType === ChoiceFilterType::TYPE_NOT_CONTAINS);
 }