public function StoreTaxTest::testDefaultZones in Commerce Core 8.2
@covers ::getDefaultZones
File
- modules/
tax/ tests/ src/ Kernel/ StoreTaxTest.php, line 127
Class
- StoreTaxTest
- @coversDefaultClass \Drupal\commerce_tax\StoreTax @group commerce
Namespace
Drupal\Tests\commerce_tax\KernelCode
public function testDefaultZones() {
$zones = $this->storeTax
->getDefaultZones($this->store);
$this
->assertCount(1, $zones);
$zone = reset($zones);
$this
->assertEquals('fr', $zone
->getId());
// Confirm that no zones are returned when no tax types apply.
$second_store = $this
->createStore('Second store', 'admin2@example.com', 'online', FALSE, 'US');
$zones = $this->storeTax
->getDefaultZones($second_store);
$this
->assertCount(0, $zones);
}