public function testNotCallable() { try { Stream::of()->map(true); } catch (\InvalidArgumentException $ex) { return; } $this->fail('An expected exception has not been raised.'); }
public function testToMap() { $res = Stream::of(['a' => 1, 'z' => 2, 'e' => 3, 'r' => 4, 't' => 5, 'y' => 6])->toMap(); $this->assertEquals(['a' => 1, 'z' => 2, 'e' => 3, 'r' => 4, 't' => 5, 'y' => 6], $res); }