diff options
author | Daniel Weipert <code@drogueronin.de> | 2020-12-16 22:07:02 +0100 |
---|---|---|
committer | Daniel Weipert <code@drogueronin.de> | 2020-12-16 22:07:02 +0100 |
commit | e3c2639e80665e623e1f1f4ce93fe80babb59f09 (patch) | |
tree | 6da034e5841b086083c779153abf65d48a4914a4 /tests/MetaboxTest.php | |
parent | 3195d4785e505f664898b6d5599c844832fa9734 (diff) |
Adds Taxonomy Term Meta supportv1.1.0
Diffstat (limited to 'tests/MetaboxTest.php')
-rw-r--r-- | tests/MetaboxTest.php | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/MetaboxTest.php b/tests/MetaboxTest.php index 1a1353e..e26c9f2 100644 --- a/tests/MetaboxTest.php +++ b/tests/MetaboxTest.php @@ -55,6 +55,25 @@ class MetaboxTest extends TestCase /** * @test */ + public function assignsTaxonomyOnce() + { + $this->metabox->taxonomy(['category', 'post_tag']); + + $expectedTaxonomies = [ + 'category' => 'category', + 'post_tag' => 'post_tag', + ]; + + $this->assertEquals($expectedTaxonomies, $this->metabox->taxonomies); + + $this->metabox->taxonomy('category'); + + $this->assertEquals($expectedTaxonomies, $this->metabox->taxonomies); + } + + /** + * @test + */ public function modifiesAndHoldsPassedField() { $this->metabox->field($this->field); |