diff --git a/tests/methods/DataRowCountTest.php b/tests/methods/DataRowCountTest.php index e617036..78faefc 100644 --- a/tests/methods/DataRowCountTest.php +++ b/tests/methods/DataRowCountTest.php @@ -17,13 +17,7 @@ class DataRowCountTest extends TestCase { */ protected $csv; - /** - * Setup - * Setup our test environment objects - * - * @access public - */ - public function setUp() { + protected function setUp(): void { $this->csv = new Csv(); } diff --git a/tests/methods/OldRequireTest.php b/tests/methods/OldRequireTest.php index fb24171..83f7f92 100644 --- a/tests/methods/OldRequireTest.php +++ b/tests/methods/OldRequireTest.php @@ -11,11 +11,11 @@ use PHPUnit\Framework\TestCase; */ class OldRequireTest extends TestCase { - protected function setUp() { + protected function setUp(): void { rename('vendor/autoload.php', '__autoload'); } - protected function tearDown() { + protected function tearDown(): void { rename('__autoload', 'vendor/autoload.php'); } diff --git a/tests/methods/ParseTest.php b/tests/methods/ParseTest.php index 25498d9..0cf8a6c 100644 --- a/tests/methods/ParseTest.php +++ b/tests/methods/ParseTest.php @@ -19,7 +19,7 @@ class ParseTest extends TestCase { * * @access public */ - public function setUp() { + protected function setUp(): void { $this->csv = new Csv(); } diff --git a/tests/methods/SaveTest.php b/tests/methods/SaveTest.php index 88d2fae..b8ec105 100644 --- a/tests/methods/SaveTest.php +++ b/tests/methods/SaveTest.php @@ -15,7 +15,7 @@ class SaveTest extends TestCase { /** * Setup our test environment objects; will be called before each test. */ - public function setUp() { + protected function setUp(): void { $this->csv = new Csv(); $this->csv->auto(__DIR__ . '/../example_files/single_column.csv'); diff --git a/tests/methods/StreamTest.php b/tests/methods/StreamTest.php index be9b594..fe8a940 100644 --- a/tests/methods/StreamTest.php +++ b/tests/methods/StreamTest.php @@ -11,7 +11,7 @@ use PHPUnit\Framework\TestCase; */ class StreamTest extends TestCase { - public function setUp() { + protected function setUp(): void { static $done; if ($done) { // Make sure we register the stream just once - or PHP will scream. diff --git a/tests/methods/UnparseTest.php b/tests/methods/UnparseTest.php index 84ddc90..4f414cc 100644 --- a/tests/methods/UnparseTest.php +++ b/tests/methods/UnparseTest.php @@ -14,7 +14,7 @@ class UnparseTest extends Testcase { /** * Setup our test environment objects; will be called before each test. */ - public function setUp() { + protected function setUp(): void { $this->csv = new Csv(); $this->csv->auto(__DIR__ . '/fixtures/auto-double-enclosure.csv'); } diff --git a/tests/properties/BaseClass.php b/tests/properties/BaseClass.php index 9341293..0f663a8 100644 --- a/tests/properties/BaseClass.php +++ b/tests/properties/BaseClass.php @@ -19,7 +19,7 @@ class BaseClass extends TestCase { * Setup * Setup our test environment objects */ - protected function setUp() { + protected function setUp(): void { $this->csv = new Csv(); } diff --git a/tests/properties/DefaultValuesPropertiesTest.php b/tests/properties/DefaultValuesPropertiesTest.php index 364f7cd..d60adab 100644 --- a/tests/properties/DefaultValuesPropertiesTest.php +++ b/tests/properties/DefaultValuesPropertiesTest.php @@ -16,27 +16,11 @@ class DefaultValuesPropertiesTest extends TestCase { */ protected $csv = null; - /** - * Setup - * Setup our test environment objects - * - * @access public - */ - public function setUp() { + protected function setUp(): void { //setup parse 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() { $this->assertTrue(is_bool($this->csv->heading)); $this->assertTrue($this->csv->heading); diff --git a/tests/properties/PublicPropertiesTest.php b/tests/properties/PublicPropertiesTest.php index b90c32f..9811e0a 100644 --- a/tests/properties/PublicPropertiesTest.php +++ b/tests/properties/PublicPropertiesTest.php @@ -41,7 +41,7 @@ class PublicPropertiesTest extends TestCase { * * @access public */ - public function setUp() { + protected function setUp(): void { //setup parse CSV $this->csv = new Csv(); @@ -58,7 +58,7 @@ class PublicPropertiesTest extends TestCase { * * @access public */ - public function tearDown() { + protected function tearDown(): void { $this->csv = null; $this->reflection = null; $this->properties = null;