Пример #1
0
 public function testExceptReturnsCollectionWithoutGivenModelKeys()
 {
     $e1 = new Entity();
     $e1->id = 1;
     $e2 = new Entity();
     $e2->id = '2';
     $e3 = new Entity();
     $e3->id = 3;
     $c = new Collection([$e1, $e2, $e3]);
     $this->assertEquals(new Collection(array($e1, $e3)), $c->except(2));
     $this->assertEquals(new Collection(array($e1)), $c->except(array(2, 3)));
 }