/**
  * @covers Moneybird\Invoice_Service::getAll
  */
 public function testGetAll()
 {
     $invoices = $this->service->getAll('draft');
     $this->assertInstanceOf('Moneybird\\Invoice\\ArrayObject', $invoices);
     $this->assertGreaterThan(0, count($invoices), 'No invoices found');
     $invoices = self::$contact->getInvoices($this->service);
     $this->assertGreaterThan(0, count($invoices), 'No invoices found');
     foreach ($invoices as $invoice) {
         $this->assertEquals(self::$contact->id, $invoice->contactId);
     }
 }
 /**
  * @covers Moneybird\RecurringTemplate_Service::getAll
  */
 public function testGetAll()
 {
     $templates = $this->service->getAll();
     $this->assertInstanceOf('Moneybird\\RecurringTemplate_Array', $templates);
     $this->assertGreaterThan(0, count($templates), 'No templates found');
     $templates = self::$contact->getRecurringTemplates($this->service);
     $this->assertGreaterThan(0, count($templates), 'No templates found');
     foreach ($templates as $template) {
         $this->assertEquals(self::$contact->id, $template->contactId);
     }
 }
Example #3
0
 /**
  * @covers Moneybird\Estimate_Service::getAll
  */
 public function testGetAll()
 {
     $estimates = $this->service->getAll('draft');
     $this->assertInstanceOf('Moneybird\\Estimate_Array', $estimates);
     $this->assertGreaterThan(0, count($estimates), 'No estimates found');
     $estimates = self::$contact->getEstimates($this->service);
     $this->assertGreaterThan(0, count($estimates), 'No estimates found');
     foreach ($estimates as $estimate) {
         $this->assertEquals(self::$contact->id, $estimate->contactId);
     }
 }
Example #4
0
 /**
  * @covers Moneybird\Contact_Service::getAll
  */
 public function testGetAll()
 {
     $contacts = $this->service->getAll();
     $this->assertInstanceOf('Moneybird\\Contact_Array', $contacts);
     $this->assertGreaterThan(0, count($contacts), 'No contacts found');
 }