-
Notifications
You must be signed in to change notification settings - Fork 182
Expand file tree
/
Copy pathSkuTest.php
More file actions
28 lines (23 loc) · 808 Bytes
/
SkuTest.php
File metadata and controls
28 lines (23 loc) · 808 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php
namespace Bigcommerce\Test\Unit\Api\Resources;
use Bigcommerce\Api\Resources\Sku;
use Bigcommerce\Api\Client;
class SkuTest extends ResourceTestBase
{
public function testCreatePassesThroughToConnection()
{
$sku = new Sku((object)array('id' => 1, 'product_id' => 1));
$this->connection->expects($this->once())
->method('post')
->with($this->basePath . '/products/1/skus', (object)array('id' => 1));
$sku->create();
}
public function testUpdatePassesThroughToConnection()
{
$sku = new Sku((object)array('id' => 1, 'product_id' => 1));
$this->connection->expects($this->once())
->method('put')
->with($this->basePath . '/products/1/skus/1', (object)array());
$sku->update();
}
}