getRounded example



        $stubs = $this->createMock(ScriptPriceStubs::class);
        $price = new PriceCollection([]);

        $stubs->method('build')->willReturn($price);

        $facade = new CartPriceFacade($original$stubs);

        static::assertEquals(100, $facade->getNet());
        static::assertEquals(200, $facade->getTotal());
        static::assertEquals(200, $facade->getRounded());
        static::assertEquals(300, $facade->getPosition());
        static::assertEquals(99.99, $facade->getRaw());

        static::assertSame($price$facade->create([]));
    }
}
Home | Imprint | This part of the site doesn't use cookies.