Sonata\InvoiceBundle\Entity\BaseInvoice::getStatusList PHP Method

getStatusList() public static method

public static getStatusList ( ) : array
return array
    public static function getStatusList()
    {
        return array(self::STATUS_OPEN => 'status_open', self::STATUS_PAID => 'status_paid', self::STATUS_CONFLICT => 'status_conflict');
    }

Usage Example

 public function testGetClass()
 {
     $renderer = new InvoiceStatusRenderer();
     $invoice = $this->getMock('Sonata\\Component\\Invoice\\InvoiceInterface');
     $invoice->expects($this->once())->method('getStatus')->will($this->returnValue(array_rand(BaseInvoice::getStatusList())));
     $this->assertContains($renderer->getStatusClass($invoice, '', 'error'), array('danger', 'warning', 'success'));
 }