public function testBuildWithoutTotal() { $checkout = new Checkout(); $checkout->addItem(CheckoutItem::of(1, 'SKU')->setExternalId('external_id')->setName(['en' => 'Name'])->setPrice(['EUR' => '10.0'])); try { $checkout->build(); $this->fail(); } catch (\LogicException $ignored) { } }
<?php #A form for filling out delivery information such as the delivery address. #All fields have to be filled in to progress. include 'model/checkout_model.php'; $p = new Checkout(); $data = $p->build(); ?> <html> <head> <link rel="stylesheet" type="text/css" href="styles.css"> </head> <body> <div class="container_brown"> <h3 class="font_green"> Delivery information </h3> <form class="font_green" method="post" action="checkout.php"> <table> <tr> <td> First name: <input type="text" name="first_name" value="<?php echo $data['first_name']; ?> " maxlength="255"> <b class="required">*</b> </td> </tr> <tr> <td> Last name: <input type="text" name="last_name" value="<?php echo $data['last_name'];