Source of file ShippingEstimatorTest.php
Size: 0,774 Bytes - Last Modified: 2021-12-23T10:25:09+00:00
/var/www/docs.ssmods.com/process/src/tests/ShippingEstimatorTest.php
123456789101112131415161718192021222324252627282930 | <?php namespace SilverShop\Shipping\Tests; use SilverStripe\Dev\SapphireTest; use SilverShop\Model\Order; use SilverShop\Model\Address; use SilverShop\Shipping\ShippingPackage; use SilverShop\Shipping\ShippingEstimator; class ShippingEstimatorTest extends SapphireTest { protected static $fixture_file = 'TableShippingMethod.yml'; function testGetEstimates() { $order = new Order(); $address = new Address(); $package = new ShippingPackage(2); $estimator = new ShippingEstimator($order, $address); $options = $estimator->getShippingMethods(); $this->assertNotNull($options, "options found"); $estimates = $estimator->getEstimates(); $this->assertNotNull($estimates, "estimates found"); } } |