Пример #1
0
 public function testGetValuesOfAMap()
 {
     $collection = new Map(['Cart' => 'cart', 'Cart.items' => 'cart/items', 'Cart.customer' => 'cart/customer', 'Cart.zipcode' => 'cart/zipcode']);
     $expected = new Immutable(['cart', 'cart/items', 'cart/customer', 'cart/zipcode']);
     $this->assertTrue($expected->equals($collection->values()));
 }
Пример #2
0
 /**
  * @expectedException \Edsonlimadev\Collections\Exception\InvalidSortException
  */
 public function testSortWithAnInvalidClosure()
 {
     $collection = new Immutable();
     $collection->sort(function ($a, $b, $c) {
     });
 }