Source of file ShopUserInfoTest.php
Size: 0,633 Bytes - Last Modified: 2021-12-23T10:24:58+00:00
/var/www/docs.ssmods.com/process/src/tests/php/ShopUserInfoTest.php
123456789101112131415161718192021222324252627 | <?php namespace SilverShop\Tests; use SilverShop\ShopUserInfo; use SilverStripe\Dev\SapphireTest; class ShopUserInfoTest extends SapphireTest { public function testSetLocation() { ShopUserInfo::singleton()->setLocation( [ 'Country' => 'NZ', 'State' => 'Wellington', 'City' => 'Newton', ] ); $location = ShopUserInfo::singleton()->getAddress(); $this->assertEquals($location->Country, 'NZ'); $this->assertEquals($location->State, 'Wellington'); $this->assertEquals($location->City, 'Newton'); } } |