Skip to content

Commit

Permalink
fix names
Browse files Browse the repository at this point in the history
  • Loading branch information
afiqiqmal committed Jun 2, 2018
1 parent a95d1e8 commit 9a3efec
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ $data = parcel_track()
<td>DHL Express Courier</td>
</tr>
<tr>
<td>dhlECommerce()</td>
<td>dhlCommerce()</td>
<td></td>
<td>DHL E-Commerce Courier</td>
</tr>
Expand All @@ -119,7 +119,7 @@ $data = parcel_track()
<td>GD Express Courier</td>
</tr>
<tr>
<td>skynet()</td>
<td>skyNet()</td>
<td></td>
<td>SkyNet Express Courier</td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion helper/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
define('PARCEL_METHOD_GET', 'GET');
define('PARCEL_METHOD_PATCH', 'PATCH');
define('PARCEL_METHOD_DELETE', 'DELETE');
define('PARCEL_USER_AGENT', 'testing/1.0');
define('PARCEL_USER_AGENT', 'parcel-tracker/1.0');

if (! function_exists('parcel_track')) {

Expand Down
4 changes: 2 additions & 2 deletions src/Contract/BaseParcelTrack.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ public function dhlExpress()
return $this;
}

public function dhlECommerce()
public function dhlCommerce()
{
$this->source = new DHLCommerce();
return $this;
}

public function skynet()
public function skyNet()
{
$this->source = new SkyNet();
return $this;
Expand Down
4 changes: 2 additions & 2 deletions tests/DHLCommerceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ class DHLCommerceTest extends TestCase
{
function testDHLCommerceSuccess()
{
$result = parcel_track()->dhlECommerce()->setTrackingNumber("5218031053514008")->fetch();
$result = parcel_track()->dhlCommerce()->setTrackingNumber("5218031053514008")->fetch();

$this->assertTrue(true);
$this->assertEquals(200, $result['code']);
}

function testDHLCommerceEmptySuccess()
{
$result = parcel_track()->dhlECommerce()->setTrackingNumber("521803105351400")->fetch();
$result = parcel_track()->dhlCommerce()->setTrackingNumber("521803105351400")->fetch();

$this->assertTrue(count($result['tracker']['checkpoints']) == 0);
$this->assertEquals(200, $result['code']);
Expand Down
4 changes: 2 additions & 2 deletions tests/SkyNetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ class SkyNetTest extends TestCase
{
function testSkyNetSuccess()
{
$result = parcel_track()->skynet()->setTrackingNumber("238216506684")->fetch();
$result = parcel_track()->skyNet()->setTrackingNumber("238216506684")->fetch();

$this->assertTrue(true);
$this->assertEquals(200, $result['code']);
}

function testSkyNetEmptySuccess()
{
$result = parcel_track()->skynet()->setTrackingNumber("238216506684A")->fetch();
$result = parcel_track()->skyNet()->setTrackingNumber("238216506684A")->fetch();

$this->assertTrue(count($result['tracker']['checkpoints']) == 0);
$this->assertEquals(200, $result['code']);
Expand Down

0 comments on commit 9a3efec

Please sign in to comment.