We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9c4d5f0 commit c70914aCopy full SHA for c70914a
1 file changed
tests/Components/OptionsArrayTest.php
@@ -69,10 +69,25 @@ public function testHas()
69
70
public function testRemove()
71
{
72
+ /* Assertion 1 */
73
$component = new OptionsArray(array('a', 'b', 'c'));
74
$this->assertTrue($component->remove('b'));
75
$this->assertFalse($component->remove('d'));
76
$this->assertEquals($component->options, array(0 => 'a', 2 => 'c'));
77
+
78
+ /* Assertion 2 */
79
+ $component = OptionsArray::parse(
80
+ new Parser(),
81
+ $this->getTokensList('A B = /*comment*/ (test) C'),
82
+ array(
83
+ 'A' => 1,
84
+ 'B' => array(2, 'var'),
85
+ 'C' => 3,
86
+ )
87
+ );
88
+ $this->assertEquals('test', $component->has('B'));
89
+ $component->remove('B');
90
+ $this->assertFalse($component->has('B'));
91
}
92
93
public function testMerge()
0 commit comments