Permalink
Browse files

新增ShippingService的整合測試

  • Loading branch information...
oomusou committed Apr 17, 2016
1 parent 21260f1 commit f736ffff42969a5e958b3d9d5340cb6acc8f5973
Showing with 18 additions and 0 deletions.
  1. +18 −0 tests/Services/ShippingServiceTest.php
@@ -29,4 +29,22 @@ public function 黑貓單元測試()
/** assert */
$this->assertEquals($expected, $actual);
}
/** @test */
public function 黑貓整合測試()
{
/** arrange */
$expected = 110;
$weight = 1;
App::bind(LogisticsInterface::class, BlackCat::class);
$target = App::make(ShippingService::class);
/** act */
$actual = $target->calculateFee($weight);
/** assert */
$this->assertEquals($expected, $actual);
}
}

0 comments on commit f736fff

Please sign in to comment.