diff --git a/tests/unit/Grav/Common/AssetsTest.php b/tests/unit/Grav/Common/AssetsTest.php index 577ed479a..b8aea496d 100644 --- a/tests/unit/Grav/Common/AssetsTest.php +++ b/tests/unit/Grav/Common/AssetsTest.php @@ -348,4 +348,27 @@ class AssetsTest extends \Codeception\TestCase\Test $this->assertFalse($assets->exists('another-unexisting-library')); } -} \ No newline at end of file +} + public function testReset() + { + $assets = $this->assets(); + + $assets->addInlineJs('alert("test")'); + $assets->reset(); + $this->assertTrue(count($assets->js()) == 0); + + $assets->addAsyncJs('jquery'); + $assets->reset(); + + $this->assertTrue(count($assets->js()) == 0); + + $assets->addInlineCss('body { color: black }'); + $assets->reset(); + + $this->assertTrue(count($assets->css()) == 0); + + $assets->add('/system/assets/debugger.css', null, true); + $assets->reset(); + + $this->assertTrue(count($assets->css()) == 0); + }