protected function setUp() { $this->customListenerCalled = false; $this->conditionEventObjects = []; $this->queryEventObject = null; $this->object = new DummyQueryTranslator(); $this->object->getEventDispatcher()->addListener(QueryTranslatorEvent::TRANSLATE_CONDITION, [$this, 'onCondition'], -100); $this->object->getEventDispatcher()->addListener(QueryTranslatorEvent::TRANSLATE_QUERY, [$this, 'onQuery'], -100); $this->condition1 = $this->getMockForAbstractClass(ConditionInterface::class); $this->condition2 = $this->getMockForAbstractClass(ConditionInterface::class); $this->query = new DummyQuery(); $this->query->addCondition($this->condition1); $this->query->addCondition($this->condition2); }
public function addCondition(ConditionInterface $condition, $name = null) { parent::addCondition($condition, $name); }