public function testValidateStatusUpdateDataOrderStatus()
 {
     $data = $this->getExemplaryStatusUpdateData();
     $validStatuses = $this->getValidStatusUpdateOrderStatuses();
     foreach ($validStatuses as $validStatus) {
         $data['orderStatus'] = $validStatus;
         $this->assertTrue($this->model->validateStatusUpdateData($data));
     }
     $data['orderStatus'] = 'INVALID_STATUS';
     $this->assertFalse($this->model->validateStatusUpdateData($data));
 }
Exemplo n.º 2
0
 /**
  * @inheritdoc
  */
 public function validateStatusUpdate(array $data = [])
 {
     return $this->dataValidator->validateEmpty($data) && $this->dataValidator->validateStatusUpdateData($data);
 }