Ejemplo n.º 1
0
 /**
  * @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();
 }
Ejemplo n.º 2
0
 /**
  * @return Annotations
  */
 public function testAnnotationsApi()
 {
     $api = Components::getApi()->annotations();
     $this->assertInstanceOf('Sellsy\\Api\\Annotations', $api);
     return $api;
 }
Ejemplo n.º 3
0
 /**
  * @return Clients
  */
 public function testClientsApi()
 {
     $catalogue = Components::getApi()->clients();
     $this->assertInstanceOf('Sellsy\\Api\\Clients', $catalogue);
     return $catalogue;
 }
Ejemplo n.º 4
0
 /**
  * @return Api
  */
 public function testNewApi()
 {
     $api = Components::getApi();
     $this->assertInstanceOf('Sellsy\\Api', $api);
     return $api;
 }
Ejemplo n.º 5
0
 /**
  * @return Staffs
  */
 public function testStaffsApi()
 {
     $staffs = Components::getApi()->staffs();
     $this->assertInstanceOf('Sellsy\\Api\\Staffs', $staffs);
     return $staffs;
 }
Ejemplo n.º 6
0
 public function setUp()
 {
     $this->documents = Components::getApi()->documents();
 }
Ejemplo n.º 7
0
 /**
  * @return Documents
  */
 public function testDocumentsApi()
 {
     $documents = Components::getApi()->documents();
     $this->assertInstanceOf('Sellsy\\Api\\Documents', $documents);
     return $documents;
 }