getStatusList() public static method

return status list.
public static getStatusList ( ) : array
return array
 public function testGetClass()
 {
     $osRenderer = new OrderStatusRenderer();
     $order = $this->getMock('Sonata\\Component\\Order\\OrderInterface');
     $order->expects($this->once())->method('getStatus')->will($this->returnValue(array_rand(BaseOrder::getStatusList())));
     $order->expects($this->once())->method('getDeliveryStatus')->will($this->returnValue(array_rand(BaseServiceDelivery::getStatusList())));
     $order->expects($this->once())->method('getPaymentStatus')->will($this->returnValue(array_rand(BaseTransaction::getStatusList())));
     $this->assertContains($osRenderer->getStatusClass($order, "", "error"), array('success', 'info', 'error'));
     $this->assertContains($osRenderer->getStatusClass($order, "payment", "error"), array('success', 'info', 'error'));
     $this->assertContains($osRenderer->getStatusClass($order, "delivery", "error"), array('success', 'info', 'error'));
 }
Exemplo n.º 2
0
 /**
  * @return string
  */
 public function getDeliveryStatusName()
 {
     $statusList = BaseServiceDelivery::getStatusList();
     return $statusList[$this->getDeliveryStatus()];
 }
Exemplo n.º 3
0
 /**
  * return delivery status list
  *
  * @return array
  */
 public static function getStatusList()
 {
     return BaseServiceDelivery::getStatusList();
 }
Exemplo n.º 4
0
 public function testGetStatusList()
 {
     $statusList = array(ServiceDeliveryInterface::STATUS_OPEN => 'status_open', ServiceDeliveryInterface::STATUS_PENDING => 'status_pending', ServiceDeliveryInterface::STATUS_SENT => 'status_sent', ServiceDeliveryInterface::STATUS_CANCELLED => 'status_cancelled', ServiceDeliveryInterface::STATUS_COMPLETED => 'status_completed', ServiceDeliveryInterface::STATUS_RETURNED => 'status_returned');
     $this->assertEquals($statusList, BaseDelivery::getStatusList());
     $this->assertEquals($statusList, BaseServiceDelivery::getStatusList());
 }