Changeset View
Changeset View
Standalone View
Standalone View
src/tests/Feature/PlanTest.php
Show First 20 Lines • Show All 89 Lines • ▼ Show 20 Lines | public function testCost(): void | ||||
$package_costs = 0; | $package_costs = 0; | ||||
foreach ($plan->packages as $package) { | foreach ($plan->packages as $package) { | ||||
$package_costs += $package->cost(); | $package_costs += $package->cost(); | ||||
} | } | ||||
$this->assertTrue( | $this->assertTrue( | ||||
$package_costs == 999, | $package_costs == 990, | ||||
"The total costs of all packages for this plan is not 9.99" | "The total costs of all packages for this plan is not 9.90" | ||||
); | ); | ||||
$this->assertTrue( | $this->assertTrue( | ||||
$plan->cost() == 999, | $plan->cost() == 990, | ||||
"The total costs for this plan is not 9.99" | "The total costs for this plan is not 9.90" | ||||
); | ); | ||||
$this->assertTrue($plan->cost() == $package_costs); | $this->assertTrue($plan->cost() == $package_costs); | ||||
} | } | ||||
public function testTenant(): void | public function testTenant(): void | ||||
{ | { | ||||
$plan = Plan::where('title', 'individual')->first(); | $plan = Plan::where('title', 'individual')->first(); | ||||
Show All 12 Lines |