public function testAddAllStepsExceptWithArray()
 {
     /** @var SearchCriteria $criteria */
     $criteria = new SearchInvoicesCriteria();
     $criteria->addAllStepsExcept(array(StepInterface::STEP_DRAFT, StepInterface::STEP_CANCELLED));
     $criteriaSteps = $criteria->getSteps();
     $expectedSteps = array(StepInterface::STEP_PAYMENT_LATE, StepInterface::STEP_PAYMENT_PARTIAL, StepInterface::STEP_PAYMENT_DONE, StepInterface::STEP_PAYMENT_DUE);
     $this->assertTrue(array_diff($criteriaSteps, $expectedSteps) === array_diff($expectedSteps, $criteriaSteps));
 }
Example #2
0
 /**
  * @param Documents $documents
  * @return InvoiceInterface
  * @depends testDocumentsApi
  */
 public function testSearchInvoicesWithPayments(Documents $documents)
 {
     $search = new SearchInvoicesCriteria();
     $search->setIncludePayments();
     $invoices = $documents->searchInvoices($search);
     $invoice = $invoices->current();
     $this->assertInstanceOf('Sellsy\\Collections\\Collection', $invoices);
     $this->assertInstanceOf('Sellsy\\Models\\Documents\\InvoiceInterface', $invoice);
     return $invoice;
 }