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