forked from shoppingflux/php-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
shoppingflux#38 - adding ticket resource and collection basics
- Loading branch information
ddattee
committed
May 28, 2018
1 parent
f971642
commit 7e215b8
Showing
7 changed files
with
44 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
src/Api/Operation/TicketCollection.php → src/Api/Task/TicketCollection.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
namespace ShoppingFeed\Sdk\Api\Task; | ||
|
||
use ShoppingFeed\Sdk\Resource\AbstractResource; | ||
|
||
class TicketResource extends AbstractResource | ||
{ | ||
/** | ||
* @return string | ||
*/ | ||
public function getId() | ||
{ | ||
return $this->getProperty('id'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
namespace ShoppingFeed\Sdk\Test\Api\Task; | ||
|
||
use ShoppingFeed\Sdk\Api\Task\TicketResource; | ||
use ShoppingFeed\Sdk\Test\Api\AbstractResourceTest; | ||
|
||
class TicketResourceTest extends AbstractResourceTest | ||
{ | ||
public function setUp() | ||
{ | ||
$this->props = [ | ||
'id' => '123abc', | ||
]; | ||
} | ||
|
||
public function testGetproperty() | ||
{ | ||
$this->initPropertyGetterTester(); | ||
|
||
$instance = new TicketResource($this->propertyGetter); | ||
|
||
$this->assertEquals($this->props['id'], $instance->getId()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters