From f16a39e7ef41b9b3c710486e3eb5302eba861044 Mon Sep 17 00:00:00 2001 From: Timo Janssrn Date: Mon, 30 Jul 2018 14:55:40 +0200 Subject: [PATCH] remove tests --- tests/test.php | 127 ------------------------------------------------- 1 file changed, 127 deletions(-) delete mode 100644 tests/test.php diff --git a/tests/test.php b/tests/test.php deleted file mode 100644 index a90663c..0000000 --- a/tests/test.php +++ /dev/null @@ -1,127 +0,0 @@ -setLanguage("NL"); - -$parcelshopRequest = $connector->getParcelshopById(); - -$parcelshopConfig = new \Wuunder\Api\Config\ParcelshopConfig(); -$parcelshopConfig->setId("6fa97a3b-fabe-47eb-8cda-13a53b2f83df"); - -if ($parcelshopConfig->validate()) { - $parcelshopRequest->setConfig($parcelshopConfig); - - if ($parcelshopRequest->fire()) { - var_dump(json_encode($parcelshopRequest->getParcelshopResponse()->getParcelshopData())); - } else { - var_dump($parcelshopRequest->getParcelshopResponse()->getError()); - } -} else { - print("ParcelshopConfig not complete"); -} - -print("----------\r\n"); - -$parcelshopsRequest = $connector->getParcelshopsByAddress(); - -$parcelshopsConfig = new \Wuunder\Api\Config\ParcelshopsConfig(); -$parcelshopsConfig->setProviders(array("DHL_PARCEL", "DPD")); -$parcelshopsConfig->setAddress("Wilgenlaan 8 maasbracht"); -$parcelshopsConfig->setLimit(40); - -if ($parcelshopsConfig->validate()) { - $parcelshopsRequest->setConfig($parcelshopsConfig); - - if ($parcelshopsRequest->fire()) { - var_dump(json_encode($parcelshopsRequest->getParcelshopsResponse()->getParcelshopsData())); - } else { - var_dump($parcelshopsRequest->getParcelshopsResponse()->getError()); - } -} else { - print("ParcelshopsConfig not complete"); -} - -print("----------\r\n"); - -$booking = $connector->createBooking(); - -$bookingConfig = new Wuunder\Api\Config\BookingConfig(); -$bookingConfig->setWebhookUrl("http://www.google.nl"); -$bookingConfig->setRedirectUrl("http://www.google.nl"); - -if ($bookingConfig->validate()) { - $booking->setConfig($bookingConfig); - - if ($booking->fire()) { - var_dump($booking->getBookingResponse()->getBookingUrl()); - } else { - var_dump($booking->getBookingResponse()->getError()); - } -} else { - print("Bookingconfig not complete"); -} - -print("----------\r\n"); - -$shipment = $connector->createShipment(); - -$shipmentConfig = new \Wuunder\Api\Config\ShipmentConfig(); -$shipmentConfig->setDescription("Test"); -$shipmentConfig->setKind("package"); -$shipmentConfig->setValue(200); -$shipmentConfig->setLength(10); -$shipmentConfig->setWidth(10); -$shipmentConfig->setHeight(10); -$shipmentConfig->setWeight(210); -$shipmentConfig->setPreferredServiceLevel("cheapest"); - -$deliveryAddress = new \Wuunder\Api\Config\AddressConfig(); -$deliveryAddress->setEmailAddress("timo@transceptor.technology"); -$deliveryAddress->setFamilyName("Janssen"); -$deliveryAddress->setGivenName("Timo"); -$deliveryAddress->setLocality("Venlo"); -$deliveryAddress->setStreetName("Noorderpoort"); -$deliveryAddress->setHouseNumber("69"); -$deliveryAddress->setZipCode("5916PJ"); -$deliveryAddress->setCountry("NL"); - -$shipmentConfig->setDeliveryAddress($deliveryAddress); - -$pickupAddress = new \Wuunder\Api\Config\AddressConfig(); -$pickupAddress->setEmailAddress("timo@transceptor.technology"); -$pickupAddress->setFamilyName("Janssen"); -$pickupAddress->setGivenName("Timo"); -$pickupAddress->setLocality("Venlo"); -$pickupAddress->setStreetName("Noorderpoort"); -$pickupAddress->setHouseNumber("69"); -$pickupAddress->setZipCode("5916PJ"); -$pickupAddress->setCountry("NL"); - -$shipmentConfig->setPickupAddress($pickupAddress); - -if ($shipmentConfig->validate()) { - $shipment->setConfig($shipmentConfig); - - if ($shipment->fire()) { - var_dump($shipment->getShipmentResponse()->getShipmentData()); - } else { - var_dump($shipment->getShipmentResponse()->getError()); - } -} else { - print("ShipmentConfig not complete"); -}