public function testUpdate() { $this->transport->shouldReceive('performRequest')->once()->withArgs(['PATCH', 'product-data/1231231231232/', [], ['category' => ['alpin-skier']], \Mockery::any()])->andReturn(['status' => 204]); $namespace = new ProductDataNamespace($this->transport); $result = $namespace->update("1231231231232", ProductDataTransfer::make(['category' => ['alpin-skier']])); $this->assertTrue($result); }
/** * @param string $ean * * @return ProductDataTransfer|null */ public function get($ean) { $endpoint = new Get($this->getTransport()); $result = $this->performWithId($endpoint, $ean); return $result ? ProductDataTransfer::make($result) : null; }