/** * @param Catalogue $catalogue * @return ItemInterface * @depends testCatalogueApi */ public function testSearchItems(Catalogue $catalogue) { Components::getMapper()->setInterfaceMapping(ItemInterface::class, NewItem::class); $items = $catalogue->searchItems(new SearchItemsCriteria()); $this->assertInstanceOf('Sellsy\\Collections\\Collection', $items); $this->assertInstanceOf('Sellsy\\Models\\Catalogue\\ItemInterface', $items->current()); return $items->current(); }
/** * @return Annotations */ public function testAnnotationsApi() { $api = Components::getApi()->annotations(); $this->assertInstanceOf('Sellsy\\Api\\Annotations', $api); return $api; }
/** * @return Clients */ public function testClientsApi() { $catalogue = Components::getApi()->clients(); $this->assertInstanceOf('Sellsy\\Api\\Clients', $catalogue); return $catalogue; }
/** * @return Api */ public function testNewApi() { $api = Components::getApi(); $this->assertInstanceOf('Sellsy\\Api', $api); return $api; }
/** * @return Staffs */ public function testStaffsApi() { $staffs = Components::getApi()->staffs(); $this->assertInstanceOf('Sellsy\\Api\\Staffs', $staffs); return $staffs; }
public function setUp() { $this->documents = Components::getApi()->documents(); }
/** * @return Documents */ public function testDocumentsApi() { $documents = Components::getApi()->documents(); $this->assertInstanceOf('Sellsy\\Api\\Documents', $documents); return $documents; }