From a22c6689a32ca18867cee098b4dd4d3b29e0f1f9 Mon Sep 17 00:00:00 2001 From: Joe <104938042+lrljoe@users.noreply.github.com> Date: Tue, 17 Oct 2023 18:17:41 +0100 Subject: [PATCH] Add Basic Tests for Loading Placeholder --- .../LoadingConfigurationTest.php | 35 +++++++++++++++++++ tests/Traits/Helpers/LoadingHelpersTest.php | 23 ++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 tests/Traits/Configuration/LoadingConfigurationTest.php create mode 100644 tests/Traits/Helpers/LoadingHelpersTest.php diff --git a/tests/Traits/Configuration/LoadingConfigurationTest.php b/tests/Traits/Configuration/LoadingConfigurationTest.php new file mode 100644 index 000000000..2d92de136 --- /dev/null +++ b/tests/Traits/Configuration/LoadingConfigurationTest.php @@ -0,0 +1,35 @@ +assertFalse($this->basicTable->hasDisplayLoadingPlaceholder()); + + $this->basicTable->setLoadingPlaceholderEnabled(); + + $this->assertTrue($this->basicTable->hasDisplayLoadingPlaceholder()); + + } + + /** @test */ + public function can_set_loading_placeholder_status_disabled(): void + { + $this->assertFalse($this->basicTable->hasDisplayLoadingPlaceholder()); + + $this->basicTable->setLoadingPlaceholderEnabled(); + + $this->assertTrue($this->basicTable->hasDisplayLoadingPlaceholder()); + + $this->basicTable->setLoadingPlaceholderDisabled(); + + $this->assertFalse($this->basicTable->hasDisplayLoadingPlaceholder()); + + } + +} diff --git a/tests/Traits/Helpers/LoadingHelpersTest.php b/tests/Traits/Helpers/LoadingHelpersTest.php new file mode 100644 index 000000000..866015227 --- /dev/null +++ b/tests/Traits/Helpers/LoadingHelpersTest.php @@ -0,0 +1,23 @@ +assertFalse($this->basicTable->hasDisplayLoadingPlaceholder()); + + $this->basicTable->setLoadingPlaceholderEnabled(); + + $this->assertTrue($this->basicTable->getDisplayLoadingPlaceholder()); + + $this->assertTrue($this->basicTable->hasDisplayLoadingPlaceholder()); + + } + + +}