diff --git a/tests/wpunit/StatusTest.php b/tests/wpunit/StatusTest.php index 81774b8..b89aee5 100644 --- a/tests/wpunit/StatusTest.php +++ b/tests/wpunit/StatusTest.php @@ -318,4 +318,18 @@ public function test_get_status_label( $option_value, $expected ): void { $this->assertEquals( $label, $status->get_status() ); } + + /** + * @dataProvider get_status_data_provider + */ + public function test_is_active( $option_value, $expected ): void { + $status = new Status(); + + update_option( $status->get_option_name(), $option_value ); + + $is_active = 1 === $expected ? true : false; + + $this->assertIsBool( $status->is_active() ); + $this->assertEquals( $is_active, $status->is_active() ); + } }