From 86afad83c504e0ff6c97ff9e60f36a2bffc783f9 Mon Sep 17 00:00:00 2001 From: Patrizio Bekerle Date: Fri, 21 Sep 2018 09:18:56 +0200 Subject: [PATCH] PHP 7.2 deprecation fixes --- tests/dataset_pdo_test.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/tests/dataset_pdo_test.php b/tests/dataset_pdo_test.php index 9c17dfe..9922bb9 100644 --- a/tests/dataset_pdo_test.php +++ b/tests/dataset_pdo_test.php @@ -109,7 +109,9 @@ public function testAutomaticDataSetUsage() $count = 0; foreach ( $dataset as $key => $value ) { - list( $compareKey, $compareValue ) = each( $dataSetArray ); + $compareValue = current( $dataSetArray ); + $compareKey = key( $dataSetArray ); + next( $dataSetArray ); $this->assertEquals( $compareKey, @@ -154,7 +156,8 @@ public function testAutomaticDataSetUsageSingleColumn() $count = 0; foreach ( $dataset as $key => $value ) { - list( $compareKey, $compareValue ) = each( $dataSetArray ); + $compareValue = current( $dataSetArray ); + next( $dataSetArray ); $this->assertEquals( $count, @@ -224,7 +227,9 @@ public function testSpecifiedDataSetUsage() $count = 0; foreach ( $dataset as $key => $value ) { - list( $compareKey, $compareValue ) = each( $dataSetArray ); + $compareValue = current( $dataSetArray ); + $compareKey = key( $dataSetArray ); + next( $dataSetArray ); $this->assertEquals( $compareKey, @@ -274,7 +279,8 @@ public function testSpecifiedDataSetUsageSingleColumn() $count = 0; foreach ( $dataset as $key => $value ) { - list( $compareKey, $compareValue ) = each( $dataSetArray ); + $compareValue = current( $dataSetArray ); + next( $dataSetArray ); $this->assertEquals( $count,