Exemplo n.º 1
0
 public function testConcat()
 {
     $this->coll->add(1)->add(2)->add(4);
     $coll2 = new ArrayList([3]);
     $this->coll->concat($coll2);
     $this->assertEquals([1, 2, 4, 3], $this->coll->toArray());
     $coll3 = new Dictionary(['key1' => 'value1', 'key2' => 'wrongValue']);
     $coll4 = new Dictionary(['key2' => 'value2']);
     $coll3->concat($coll4);
     $this->assertEquals(['key1' => 'value1', 'key2' => 'value2'], $coll3->toArray());
 }
Exemplo n.º 2
0
 public function testSortByKey()
 {
     $this->coll->add('testing');
     $this->coll->sortByKey();
     $this->assertTrue(is_array($this->coll->toArray()));
 }