public function createChildOperation()
 {
     $operation = new Operation();
     $operation->setParent($this);
     $this->_operations[] = $operation;
     return $operation;
 }
 public function testAsArray()
 {
     $operation = new Operation();
     $operation->setFieldName("name");
     $operation->setOperator("eq");
     $operation->addValue("one");
     $operation->addValue("two");
     $expected = ['field_name' => 'name', 'operator' => 'eq', 'values' => ['one', 'two']];
     $this->assertEquals($expected, $operation->toArray());
 }