mirror of
https://github.com/nothingworksinc/ticketbeast.git
synced 2026-01-27 19:45:24 +00:00
26 lines
614 B
PHP
26 lines
614 B
PHP
<?php
|
|
|
|
use App\Ticket;
|
|
use App\Concert;
|
|
use App\Reservation;
|
|
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
|
use Illuminate\Foundation\Testing\DatabaseMigrations;
|
|
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
|
|
|
class ReservationTest extends TestCase
|
|
{
|
|
/** @test */
|
|
function calculating_the_total_cost()
|
|
{
|
|
$tickets = collect([
|
|
(object) ['price' => 1200],
|
|
(object) ['price' => 1200],
|
|
(object) ['price' => 1200],
|
|
]);
|
|
|
|
$reservation = new Reservation($tickets);
|
|
|
|
$this->assertEquals(3600, $reservation->totalCost());
|
|
}
|
|
}
|