Пример #1
0
 /**
  * Tests that the proper status is returned
  */
 function test_get_status()
 {
     $order = new APP_Draft_Order();
     $this->assertEquals(APPTHEMES_ORDER_PENDING, $order->get_status());
     $this->assertEquals('Pending', $order->get_display_status());
     $order->failed();
     $this->assertEquals(APPTHEMES_ORDER_FAILED, $order->get_status());
     $this->assertEquals('Failed', $order->get_display_status());
     $order->complete();
     $this->assertEquals(APPTHEMES_ORDER_COMPLETED, $order->get_status());
     $this->assertEquals('Completed', $order->get_display_status());
     $order->activate();
     $this->assertEquals(APPTHEMES_ORDER_ACTIVATED, $order->get_status());
     $this->assertEquals('Activated', $order->get_display_status());
 }