Skip to content

Commit 0f88db4

Browse files
committed
Drop useless tests as we have types now
1 parent add4fe2 commit 0f88db4

File tree

1 file changed

+0
-32
lines changed

1 file changed

+0
-32
lines changed

tests/IterableToArrayTest.php

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -28,36 +28,4 @@ public function testArrayWithoutKeysToArray(): void
2828
$array = [1 => 'foo', 2 => 'bar'];
2929
$this->assertEquals([0 => 'foo', 1 => 'bar'], iterable_to_array($array, false));
3030
}
31-
32-
public function testScalarToArray(): void
33-
{
34-
$scalar = 'foobar';
35-
$this->assertTrue($this->triggersError($scalar));
36-
}
37-
38-
public function testObjectToArray(): void
39-
{
40-
$object = new stdClass();
41-
$this->assertTrue($this->triggersError($object));
42-
}
43-
44-
public function testResourceToArray(): void
45-
{
46-
$resource = fopen('php://temp', 'rb');
47-
$this->assertTrue($this->triggersError($resource));
48-
}
49-
50-
private function triggersError($input): bool
51-
{
52-
$errorOccured = false;
53-
54-
try {
55-
iterable_to_array($input);
56-
} catch (\TypeError $e) {
57-
$errorOccured = true;
58-
}
59-
60-
return $errorOccured;
61-
}
62-
6331
}

0 commit comments

Comments
 (0)