From f7f47936e2d84064caa386ebc9b3e148ddbd3e9b Mon Sep 17 00:00:00 2001 From: Oliver Klee Date: Sat, 7 Sep 2019 09:38:33 +0200 Subject: [PATCH] Make the return type of TestSuiteIterator.current nullable --- src/Framework/TestSuiteIterator.php | 2 +- tests/unit/Framework/TestSuiteIteratorTest.php | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/Framework/TestSuiteIterator.php b/src/Framework/TestSuiteIterator.php index 8df92e96eba..3966b408af0 100644 --- a/src/Framework/TestSuiteIterator.php +++ b/src/Framework/TestSuiteIterator.php @@ -58,7 +58,7 @@ public function key(): int /** * Returns the current element. */ - public function current(): Test + public function current(): ?Test { return $this->valid() ? $this->tests[$this->position] : null; } diff --git a/tests/unit/Framework/TestSuiteIteratorTest.php b/tests/unit/Framework/TestSuiteIteratorTest.php index 43a17b4c227..86d4140435e 100644 --- a/tests/unit/Framework/TestSuiteIteratorTest.php +++ b/tests/unit/Framework/TestSuiteIteratorTest.php @@ -36,8 +36,6 @@ public function testValidForEmptyTestSuiteInitiallyReturnsFalse(): void public function testCurrentForEmptyTestSuiteInitiallyReturnsNull(): void { - $this->markTestSkipped('This test needs a bug fix to pass.'); - $testSuite = new TestSuite(); $subject = new TestSuiteIterator($testSuite); @@ -123,8 +121,6 @@ public function testNextIncreasesKeyFromZeroToOne(): void public function testCurrentAfterLastElementReturnsNull(): void { - $this->markTestSkipped('This test needs a bug fix to pass.'); - $testSuite = new TestSuite(); $testSuite->addTest(new \EmptyTestCaseTest()); $subject = new TestSuiteIterator($testSuite);