Lines Matching refs:stack
124 $stack = new StateStack("one");
125 $this->assertEquals($stack->getCurrent(), "one");
128 $stack = new StateStack("one");
129 $this->assertFalse($stack->leave());
132 $stack = new StateStack("one");
133 $stack->enter("two");
134 $this->assertEquals($stack->getCurrent(), "two");
135 $stack->enter("three");
136 $this->assertEquals($stack->getCurrent(), "three");
137 $this->assertTrue($stack->leave());
138 $this->assertEquals($stack->getCurrent(), "two");
139 $stack->enter("third");
140 $this->assertEquals($stack->getCurrent(), "third");
141 $this->assertTrue($stack->leave());
142 $this->assertTrue($stack->leave());
143 $this->assertEquals($stack->getCurrent(), "one");