mirror of
https://github.com/parsecsv/parsecsv-for-php.git
synced 2026-02-19 08:36:39 +00:00
Adjust function signatures for newer PHPUnit versions
Will make an update to PHPUnit 8 or 9 easier.
This commit is contained in:
@@ -17,13 +17,7 @@ class DataRowCountTest extends TestCase {
|
|||||||
*/
|
*/
|
||||||
protected $csv;
|
protected $csv;
|
||||||
|
|
||||||
/**
|
protected function setUp(): void {
|
||||||
* Setup
|
|
||||||
* Setup our test environment objects
|
|
||||||
*
|
|
||||||
* @access public
|
|
||||||
*/
|
|
||||||
public function setUp() {
|
|
||||||
$this->csv = new Csv();
|
$this->csv = new Csv();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,11 +11,11 @@ use PHPUnit\Framework\TestCase;
|
|||||||
*/
|
*/
|
||||||
class OldRequireTest extends TestCase {
|
class OldRequireTest extends TestCase {
|
||||||
|
|
||||||
protected function setUp() {
|
protected function setUp(): void {
|
||||||
rename('vendor/autoload.php', '__autoload');
|
rename('vendor/autoload.php', '__autoload');
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function tearDown() {
|
protected function tearDown(): void {
|
||||||
rename('__autoload', 'vendor/autoload.php');
|
rename('__autoload', 'vendor/autoload.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ class ParseTest extends TestCase {
|
|||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
protected function setUp(): void {
|
||||||
$this->csv = new Csv();
|
$this->csv = new Csv();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ class SaveTest extends TestCase {
|
|||||||
/**
|
/**
|
||||||
* Setup our test environment objects; will be called before each test.
|
* Setup our test environment objects; will be called before each test.
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
protected function setUp(): void {
|
||||||
$this->csv = new Csv();
|
$this->csv = new Csv();
|
||||||
$this->csv->auto(__DIR__ . '/../example_files/single_column.csv');
|
$this->csv->auto(__DIR__ . '/../example_files/single_column.csv');
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ use PHPUnit\Framework\TestCase;
|
|||||||
*/
|
*/
|
||||||
class StreamTest extends TestCase {
|
class StreamTest extends TestCase {
|
||||||
|
|
||||||
public function setUp() {
|
protected function setUp(): void {
|
||||||
static $done;
|
static $done;
|
||||||
if ($done) {
|
if ($done) {
|
||||||
// Make sure we register the stream just once - or PHP will scream.
|
// Make sure we register the stream just once - or PHP will scream.
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ class UnparseTest extends Testcase {
|
|||||||
/**
|
/**
|
||||||
* Setup our test environment objects; will be called before each test.
|
* Setup our test environment objects; will be called before each test.
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
protected function setUp(): void {
|
||||||
$this->csv = new Csv();
|
$this->csv = new Csv();
|
||||||
$this->csv->auto(__DIR__ . '/fixtures/auto-double-enclosure.csv');
|
$this->csv->auto(__DIR__ . '/fixtures/auto-double-enclosure.csv');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ class BaseClass extends TestCase {
|
|||||||
* Setup
|
* Setup
|
||||||
* Setup our test environment objects
|
* Setup our test environment objects
|
||||||
*/
|
*/
|
||||||
protected function setUp() {
|
protected function setUp(): void {
|
||||||
$this->csv = new Csv();
|
$this->csv = new Csv();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,27 +16,11 @@ class DefaultValuesPropertiesTest extends TestCase {
|
|||||||
*/
|
*/
|
||||||
protected $csv = null;
|
protected $csv = null;
|
||||||
|
|
||||||
/**
|
protected function setUp(): void {
|
||||||
* Setup
|
|
||||||
* Setup our test environment objects
|
|
||||||
*
|
|
||||||
* @access public
|
|
||||||
*/
|
|
||||||
public function setUp() {
|
|
||||||
//setup parse CSV
|
//setup parse CSV
|
||||||
$this->csv = new Csv();
|
$this->csv = new Csv();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Tear down
|
|
||||||
* Tear down our test environment objects
|
|
||||||
*
|
|
||||||
* @access public
|
|
||||||
*/
|
|
||||||
public function tearDown() {
|
|
||||||
$this->csv = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function test_heading_default() {
|
public function test_heading_default() {
|
||||||
$this->assertTrue(is_bool($this->csv->heading));
|
$this->assertTrue(is_bool($this->csv->heading));
|
||||||
$this->assertTrue($this->csv->heading);
|
$this->assertTrue($this->csv->heading);
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ class PublicPropertiesTest extends TestCase {
|
|||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
protected function setUp(): void {
|
||||||
//setup parse CSV
|
//setup parse CSV
|
||||||
$this->csv = new Csv();
|
$this->csv = new Csv();
|
||||||
|
|
||||||
@@ -58,7 +58,7 @@ class PublicPropertiesTest extends TestCase {
|
|||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
protected function tearDown(): void {
|
||||||
$this->csv = null;
|
$this->csv = null;
|
||||||
$this->reflection = null;
|
$this->reflection = null;
|
||||||
$this->properties = null;
|
$this->properties = null;
|
||||||
|
|||||||
Reference in New Issue
Block a user