From aa1af7c404d62879140a76e8e9404584c7776b5f Mon Sep 17 00:00:00 2001 From: oliverde8 Date: Fri, 17 Feb 2017 11:14:26 +0100 Subject: [PATCH] Added test for the clear function. --- tests/AssociativeArrayTest.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/AssociativeArrayTest.php b/tests/AssociativeArrayTest.php index fcf4f50..36814c8 100644 --- a/tests/AssociativeArrayTest.php +++ b/tests/AssociativeArrayTest.php @@ -187,4 +187,12 @@ public function testReadOnly() { $array->set('aaa', []); } + + public function testClear() + { + $array = new AssociativeArray($this->recursiveData, '.'); + $array->clear(); + + $this->assertEmpty($array->getArray()); + } }