/** * This method tests the "item" related methods. */ public function test_items() { $p0 = IArrayList\Type::box2(IInt32\Type::zero(), IInt32\Type::one(), IInt32\Type::box(2)); $this->assertSame(0, $p0->item(IInt32\Type::zero())->unbox()); $this->assertSame(1, $p0->item(IInt32\Type::one())->unbox()); $this->assertSame(2, $p0->item(IInt32\Type::box(2))->unbox()); $this->assertSame(0, $p0->head()->unbox()); $p1 = $p0->tail(); $this->assertInstanceOf('\\Saber\\Data\\IArrayList\\Type', $p1); $this->assertSame(array(1, 2), $p1->unbox(1)); }