/** * @return ProformaInterface */ public function testGetProforma() { $proforma = $this->documents->getProforma(new GetProformaCriteria(DOCUMENT_PROFORMA_ID)); $this->assertInstanceOf('Sellsy\\Models\\Documents\\ProformaInterface', $proforma); return $proforma; }
/** * @param Documents $documents * @return Collection * @depends testDocumentsApi */ public function testCollectionAutoloadOff(Documents $documents) { $criteria = new SearchEstimatesCriteria(); $criteria->setCreatePeriod(new \DateTime('@1457478000'), new \DateTime('@1457564400')); $paginator = new Paginator(); $paginator->setNumberPerPage(10); $paginator->setPageNumber(1); $estimates = $documents->searchEstimates($criteria, $paginator); $estimatesCount = 0; /** @var EstimateInterface $estimate */ foreach ($estimates as $estimate) { $estimatesCount++; } $this->assertEquals(10, $estimatesCount); return $estimates; }