diff options
Diffstat (limited to 'tests')
-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); |