/** * @test */ public function itExposesItsKeyAndOperator() { $key = 'age'; $operator = new GreaterThan(42); $condition = new OperatorCondition($key, $operator); $this->assertEquals($key, $condition->getKey()); $this->assertEquals($operator, $condition->getOperator()); }
/** * @param OperatorCondition $condition * * @return string */ public function serialize(OperatorCondition $condition) { return array('name' => 'operator-condition', 'key' => $condition->getKey(), 'operator' => $this->operatorSerializer->serialize($condition->getOperator())); }