/** * @depends testProductPost */ public function testProductDelete() { $products = $this->client->getProducts(['query' => ['fields' => 'id']]); foreach ($products as $product) { $response = $this->client->deleteProduct($product->id); $this->assertFalse($this->client->hasErrors(), 'Client has errors'); } $this->assertEquals(0, $this->client->getProductsCount(), 'Not all products were deleted.'); }