shift and unshift were reversed
This commit is contained in:
parent
a1f8b897af
commit
0d3c017d20
1 changed files with 4 additions and 4 deletions
|
@ -22,12 +22,12 @@ class FlatArrayPushPopTest extends TestCase
|
|||
public function testShiftUnshift()
|
||||
{
|
||||
$f = new FlatArray();
|
||||
$f->shift(null, 'foo');
|
||||
$f->shift(null, 'bar');
|
||||
$f->unshift(null, 'foo');
|
||||
$f->unshift(null, 'bar');
|
||||
$this->assertEquals(['bar','foo'], $f->get());
|
||||
$this->assertEquals('bar', $f->unshift(null));
|
||||
$this->assertEquals('bar', $f->shift(null));
|
||||
$this->assertEquals(['foo'], $f->get());
|
||||
$this->assertEquals('foo', $f->unshift(null));
|
||||
$this->assertEquals('foo', $f->shift(null));
|
||||
$this->assertEquals([], $f->get());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue