Пример #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
 public function testEqualsWithACollectionWithDifferentNumberOfElements()
 {
     $collectionA = new Immutable([42, 'Family Guy']);
     $collectionB = new Immutable([42, 'Family Guy', 'Cleveland Show']);
     $this->assertFalse($collectionA->equals($collectionB));
 }