expectException(\TypeError::class); // When Iter::zip($nonIterable); } /** * @return array */ public function dataProviderForNonIterables(): array { return [ 'int' => [5], 'float' => [5.5], 'string' => ['abc def'], 'bool' => [true], 'object' => [new \stdClass()], ]; } /** * @test Nothing to iterate does nothing */ public function testNothingToIterate() { // Given $nothing = []; $result = []; // When foreach (Iter::zip($nothing) as $_) { $result[] = $_; } // Then $this->assertEmpty($result); } }