Skip to content

Commit 3d14aa6

Browse files
author
Rudi Theunissen
committed
Remove assertions testing errors and notices
1 parent 102adaf commit 3d14aa6

File tree

2 files changed

+1
-19
lines changed

2 files changed

+1
-19
lines changed

tests/CollectionTest.php

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -87,16 +87,6 @@ public function assertToArray(array $expected, $instance)
8787
$this->assertEquals(array_keys ($expected), array_keys ($actual), "!!! ARRAY KEY MISMATCH");
8888
}
8989

90-
public function expectAccessByReferenceHasNoEffect()
91-
{
92-
static::expectException(Notice::class);
93-
}
94-
95-
public function expectPropertyDoesNotExistException()
96-
{
97-
static::expectException(Notice::class);
98-
}
99-
10090
public function expectReconstructionNotAllowedException()
10191
{
10292
static::expectException(\Error::class);
@@ -160,7 +150,7 @@ public function expectNotIterableOrArrayException()
160150
public function expectInternalIllegalOffset()
161151
{
162152
if (PHP_MAJOR_VERSION === 7) {
163-
static::expectException(Warning::class);
153+
static::markTestSkipped(); // PHP 7 does not promote E_ERROR to an exception.
164154
} else {
165155
static::expectException(\TypeError::class);
166156
}

tests/Set/get.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,6 @@ public function testArrayAccessGetIndexOutOfRange($initial, $index)
9292
$instance[$index];
9393
}
9494

95-
public function testArrayAccessGetByReference()
96-
{
97-
$instance = $this->getInstance([[1]]);
98-
$this->expectAccessByReferenceHasNoEffect();
99-
$instance[0][0] = null;
100-
$this->assertEquals([1], $instance[0]);
101-
}
102-
10395
public function testGetFirstAfterRemove()
10496
{
10597
$instance = $this->getInstance();

0 commit comments

Comments
 (0)