summaryrefslogtreecommitdiffstats
path: root/tests/Components/OptionsArrayTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Components/OptionsArrayTest.php')
-rw-r--r--tests/Components/OptionsArrayTest.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/Components/OptionsArrayTest.php b/tests/Components/OptionsArrayTest.php
index 5df776b..ea521b3 100644
--- a/tests/Components/OptionsArrayTest.php
+++ b/tests/Components/OptionsArrayTest.php
@@ -69,10 +69,25 @@ class OptionsArrayTest extends TestCase
public function testRemove()
{
+ /* Assertion 1 */
$component = new OptionsArray(array('a', 'b', 'c'));
$this->assertTrue($component->remove('b'));
$this->assertFalse($component->remove('d'));
$this->assertEquals($component->options, array(0 => 'a', 2 => 'c'));
+
+ /* Assertion 2 */
+ $component = OptionsArray::parse(
+ new Parser(),
+ $this->getTokensList('A B = /*comment*/ (test) C'),
+ array(
+ 'A' => 1,
+ 'B' => array(2, 'var'),
+ 'C' => 3,
+ )
+ );
+ $this->assertEquals('test', $component->has('B'));
+ $component->remove('B');
+ $this->assertFalse($component->has('B'));
}
public function testMerge()