Exemplo n.º 1
0
 public function testEmpty()
 {
     $seq = new Sequence([1, 2, 3]);
     $this->assertFalse($seq->isEmpty());
     $seq = new Sequence([null]);
     $this->assertFalse($seq->isEmpty());
     $this->assertTrue($seq->filter(function ($i) {
         return $i !== null;
     })->isEmpty());
 }