Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"require": {
"php": ">=5.3.3",
"phpunit/php-file-iterator": "~1.4",
"php5friends/php-file-iterator14": "~1.4.6",
"phpunit/php-text-template": "~1.2",
"phpunit/php-code-coverage": "~2.1",
"phpunit/php-timer": "^1.0.6",
Expand All @@ -32,13 +32,13 @@
"sebastian/diff": "~1.2",
"sebastian/environment": "~1.3",
"sebastian/exporter": "~1.2",
"sebastian/global-state": "~1.0",
"sebastian/version": "~1.0",
"ext-dom": "*",
"ext-json": "*",
"ext-pcre": "*",
"ext-reflection": "*",
"ext-spl": "*"
"ext-spl": "*",
"php5friends/global-state11": "~1.1.2"
},
"config": {
"platform": {
Expand Down
1 change: 1 addition & 0 deletions src/Extensions/PhptTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ public function __construct($filename)
*
* @return int
*/
#[\ReturnTypeWillChange]
public function count()
{
return 1;
Expand Down
1 change: 1 addition & 0 deletions src/Extensions/TestDecorator.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ public function basicRun(PHPUnit_Framework_TestResult $result)
*
* @return int
*/
#[\ReturnTypeWillChange]
public function count()
{
return count($this->test);
Expand Down
1 change: 1 addition & 0 deletions src/Framework/Constraint.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ protected function matches($other)
*
* @since Method available since Release 3.4.0
*/
#[\ReturnTypeWillChange]
public function count()
{
return 1;
Expand Down
1 change: 1 addition & 0 deletions src/Framework/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ public function toString()
*
* @return int
*/
#[\ReturnTypeWillChange]
public function count()
{
return 1;
Expand Down
1 change: 1 addition & 0 deletions src/Framework/TestResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -738,6 +738,7 @@ public function run(PHPUnit_Framework_Test $test)
*
* @return int
*/
#[\ReturnTypeWillChange]
public function count()
{
return $this->runTests;
Expand Down
2 changes: 2 additions & 0 deletions src/Framework/TestSuite.php
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,7 @@ public function addTestFiles($filenames)
*
* @return int
*/
#[\ReturnTypeWillChange]
public function count($preferCache = false)
{
if ($preferCache && $this->cachedNumTests != null) {
Expand Down Expand Up @@ -968,6 +969,7 @@ public function setBackupStaticAttributes($backupStaticAttributes)
*
* @since Method available since Release 3.1.0
*/
#[\ReturnTypeWillChange]
public function getIterator()
{
$iterator = new PHPUnit_Util_TestSuiteIterator($this);
Expand Down
1 change: 1 addition & 0 deletions src/Runner/Filter/Group.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ function ($test) {
/**
* @return bool
*/
#[\ReturnTypeWillChange]
public function accept()
{
$test = $this->getInnerIterator()->current();
Expand Down
1 change: 1 addition & 0 deletions src/Runner/Filter/Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ protected function setFilter($filter)
/**
* @return bool
*/
#[\ReturnTypeWillChange]
public function accept()
{
$test = $this->getInnerIterator()->current();
Expand Down
7 changes: 7 additions & 0 deletions src/Util/TestSuiteIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public function __construct(PHPUnit_Framework_TestSuite $testSuite)
/**
* Rewinds the Iterator to the first element.
*/
#[\ReturnTypeWillChange]
public function rewind()
{
$this->position = 0;
Expand All @@ -46,6 +47,7 @@ public function rewind()
*
* @return bool
*/
#[\ReturnTypeWillChange]
public function valid()
{
return $this->position < count($this->tests);
Expand All @@ -56,6 +58,7 @@ public function valid()
*
* @return int
*/
#[\ReturnTypeWillChange]
public function key()
{
return $this->position;
Expand All @@ -66,6 +69,7 @@ public function key()
*
* @return PHPUnit_Framework_Test
*/
#[\ReturnTypeWillChange]
public function current()
{
return $this->valid() ? $this->tests[$this->position] : null;
Expand All @@ -74,6 +78,7 @@ public function current()
/**
* Moves forward to next element.
*/
#[\ReturnTypeWillChange]
public function next()
{
$this->position++;
Expand All @@ -84,6 +89,7 @@ public function next()
*
* @return PHPUnit_Util_TestSuiteIterator
*/
#[\ReturnTypeWillChange]
public function getChildren()
{
return new self(
Expand All @@ -96,6 +102,7 @@ public function getChildren()
*
* @return bool
*/
#[\ReturnTypeWillChange]
public function hasChildren()
{
return $this->tests[$this->position] instanceof PHPUnit_Framework_TestSuite;
Expand Down
2 changes: 1 addition & 1 deletion tests/_files/DoubleTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public function __construct(PHPUnit_Framework_TestCase $testCase)
{
$this->testCase = $testCase;
}

#[\ReturnTypeWillChange]
public function count()
{
return 2;
Expand Down
4 changes: 4 additions & 0 deletions tests/_files/SampleArrayAccess.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public function __construct()
{
$this->container = array();
}
#[\ReturnTypeWillChange]
public function offsetSet($offset, $value)
{
if (is_null($offset)) {
Expand All @@ -21,14 +22,17 @@ public function offsetSet($offset, $value)
$this->container[$offset] = $value;
}
}
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
#[\ReturnTypeWillChange]
public function offsetUnset($offset)
{
unset($this->container[$offset]);
}
#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
return isset($this->container[$offset]) ? $this->container[$offset] : null;
Expand Down
10 changes: 5 additions & 5 deletions tests/_files/TestIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,27 @@ public function __construct($array = array())
{
$this->array = $array;
}

#[\ReturnTypeWillChange]
public function rewind()
{
$this->position = 0;
}

#[\ReturnTypeWillChange]
public function valid()
{
return $this->position < count($this->array);
}

#[\ReturnTypeWillChange]
public function key()
{
return $this->position;
}

#[\ReturnTypeWillChange]
public function current()
{
return $this->array[$this->position];
}

#[\ReturnTypeWillChange]
public function next()
{
$this->position++;
Expand Down
10 changes: 5 additions & 5 deletions tests/_files/TestIterator2.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,27 @@ public function __construct(array $array)
{
$this->data = $array;
}

#[\ReturnTypeWillChange]
public function current()
{
return current($this->data);
}

#[\ReturnTypeWillChange]
public function next()
{
next($this->data);
}

#[\ReturnTypeWillChange]
public function key()
{
return key($this->data);
}

#[\ReturnTypeWillChange]
public function valid()
{
return key($this->data) !== null;
}

#[\ReturnTypeWillChange]
public function rewind()
{
reset($this->data);
Expand Down