Add unit test for WC_Tax::get_tax_rate_classes()
This commit is contained in:
parent
3865c615b9
commit
ad0eff11de
|
@ -466,8 +466,25 @@ class WC_Tests_Tax extends WC_Unit_Test_Case {
|
||||||
$tax_classes = WC_Tax::get_tax_classes();
|
$tax_classes = WC_Tax::get_tax_classes();
|
||||||
$this->assertEquals( $tax_classes, array( 'Reduced rate', 'Zero rate' ) );
|
$this->assertEquals( $tax_classes, array( 'Reduced rate', 'Zero rate' ) );
|
||||||
|
|
||||||
$tax_classes = WC_Tax::get_tax_class_slugs();
|
$tax_class_slugs = WC_Tax::get_tax_class_slugs();
|
||||||
$this->assertEquals( $tax_classes, array( 'reduced-rate', 'zero-rate' ) );
|
$this->assertEquals( $tax_class_slugs, array( 'reduced-rate', 'zero-rate' ) );
|
||||||
|
|
||||||
|
$tax_rate_classes = WC_Tax::get_tax_rate_classes();
|
||||||
|
$this->assertEquals(
|
||||||
|
$tax_rate_classes,
|
||||||
|
array(
|
||||||
|
(object) array(
|
||||||
|
'tax_rate_class_id' => '1',
|
||||||
|
'name' => 'Reduced rate',
|
||||||
|
'slug' => 'reduced-rate',
|
||||||
|
),
|
||||||
|
(object) array(
|
||||||
|
'tax_rate_class_id' => '2',
|
||||||
|
'name' => 'Zero rate',
|
||||||
|
'slug' => 'zero-rate',
|
||||||
|
),
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue