From 96189aca2ba31c027cecec7389fc753dbb6b47e6 Mon Sep 17 00:00:00 2001 From: Nikolaos Dimopoulos Date: Mon, 1 Jul 2019 13:38:10 -0400 Subject: [PATCH] [#14213] - More references corrections --- phalcon/Validation/Validation.zep | 8 ++--- .../CombinedFieldsValidator/ConstructCest.php | 34 ------------------- .../CombinedFieldsValidator/GetOptionCest.php | 33 ------------------ .../CombinedFieldsValidator/HasOptionCest.php | 33 ------------------ .../CombinedFieldsValidator/SetOptionCest.php | 33 ------------------ .../CombinedFieldsValidator/ValidateCest.php | 33 ------------------ 6 files changed, 4 insertions(+), 170 deletions(-) delete mode 100644 tests/integration/Validation/CombinedFieldsValidator/ConstructCest.php delete mode 100644 tests/integration/Validation/CombinedFieldsValidator/GetOptionCest.php delete mode 100644 tests/integration/Validation/CombinedFieldsValidator/HasOptionCest.php delete mode 100644 tests/integration/Validation/CombinedFieldsValidator/SetOptionCest.php delete mode 100644 tests/integration/Validation/CombinedFieldsValidator/ValidateCest.php diff --git a/phalcon/Validation/Validation.zep b/phalcon/Validation/Validation.zep index 61100bb75aa..aaf9044199f 100644 --- a/phalcon/Validation/Validation.zep +++ b/phalcon/Validation/Validation.zep @@ -19,7 +19,7 @@ use Phalcon\Messages\Messages; use Phalcon\Validation\ValidationInterface; use Phalcon\Validation\Exception; use Phalcon\Validation\ValidatorInterface; -use Phalcon\Validation\CombinedFieldsValidator; +use Phalcon\Validation\AbstractCombinedFieldsValidator; /** * Phalcon\Validation @@ -45,14 +45,14 @@ class Validation extends Injectable implements ValidationInterface let this->validators = array_filter( validators, function(var element) { - return typeof element[0] != "array" || !(element[1] instanceof CombinedFieldsValidator); + return typeof element[0] != "array" || !(element[1] instanceof AbstractCombinedFieldsValidator); } ); let this->combinedFieldsValidators = array_filter( validators, function(var element) { - return typeof element[0] == "array" && element[1] instanceof CombinedFieldsValidator; + return typeof element[0] == "array" && element[1] instanceof AbstractCombinedFieldsValidator; } ); @@ -73,7 +73,7 @@ class Validation extends Injectable implements ValidationInterface if typeof field == "array" { // Uniqueness validator for combination of fields is handled differently - if validator instanceof CombinedFieldsValidator { + if validator instanceof AbstractCombinedFieldsValidator { let this->combinedFieldsValidators[] = [field, validator]; } else { for singleField in field { diff --git a/tests/integration/Validation/CombinedFieldsValidator/ConstructCest.php b/tests/integration/Validation/CombinedFieldsValidator/ConstructCest.php deleted file mode 100644 index 34433727f3a..00000000000 --- a/tests/integration/Validation/CombinedFieldsValidator/ConstructCest.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE.txt - * file that was distributed with this source code. - */ - -namespace Phalcon\Test\Integration\Validation\CombinedFieldsValidator; - -use IntegrationTester; - -/** - * Class ConstructCest - */ -class ConstructCest -{ - /** - * Tests Phalcon\Validation\CombinedFieldsValidator :: __construct() - * - * @author Phalcon Team - * @since 2018-11-13 - */ - public function validationCombinedfieldsvalidatorConstruct(IntegrationTester $I) - { - $I->wantToTest('Validation\CombinedFieldsValidator - __construct()'); - - $I->skipTest('Need implementation'); - } -} diff --git a/tests/integration/Validation/CombinedFieldsValidator/GetOptionCest.php b/tests/integration/Validation/CombinedFieldsValidator/GetOptionCest.php deleted file mode 100644 index 804cced7b81..00000000000 --- a/tests/integration/Validation/CombinedFieldsValidator/GetOptionCest.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE.txt - * file that was distributed with this source code. - */ - -namespace Phalcon\Test\Integration\Validation\CombinedFieldsValidator; - -use IntegrationTester; - -/** - * Class GetOptionCest - */ -class GetOptionCest -{ - /** - * Tests Phalcon\Validation\CombinedFieldsValidator :: getOption() - * - * @author Phalcon Team - * @since 2018-11-13 - */ - public function validationCombinedfieldsvalidatorGetOption(IntegrationTester $I) - { - $I->wantToTest('Validation\CombinedFieldsValidator - getOption()'); - $I->skipTest('Need implementation'); - } -} diff --git a/tests/integration/Validation/CombinedFieldsValidator/HasOptionCest.php b/tests/integration/Validation/CombinedFieldsValidator/HasOptionCest.php deleted file mode 100644 index 0f33e0ac4d6..00000000000 --- a/tests/integration/Validation/CombinedFieldsValidator/HasOptionCest.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE.txt - * file that was distributed with this source code. - */ - -namespace Phalcon\Test\Integration\Validation\CombinedFieldsValidator; - -use IntegrationTester; - -/** - * Class HasOptionCest - */ -class HasOptionCest -{ - /** - * Tests Phalcon\Validation\CombinedFieldsValidator :: hasOption() - * - * @author Phalcon Team - * @since 2018-11-13 - */ - public function validationCombinedfieldsvalidatorHasOption(IntegrationTester $I) - { - $I->wantToTest('Validation\CombinedFieldsValidator - hasOption()'); - $I->skipTest('Need implementation'); - } -} diff --git a/tests/integration/Validation/CombinedFieldsValidator/SetOptionCest.php b/tests/integration/Validation/CombinedFieldsValidator/SetOptionCest.php deleted file mode 100644 index 3717531b02c..00000000000 --- a/tests/integration/Validation/CombinedFieldsValidator/SetOptionCest.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE.txt - * file that was distributed with this source code. - */ - -namespace Phalcon\Test\Integration\Validation\CombinedFieldsValidator; - -use IntegrationTester; - -/** - * Class SetOptionCest - */ -class SetOptionCest -{ - /** - * Tests Phalcon\Validation\CombinedFieldsValidator :: setOption() - * - * @author Phalcon Team - * @since 2018-11-13 - */ - public function validationCombinedfieldsvalidatorSetOption(IntegrationTester $I) - { - $I->wantToTest('Validation\CombinedFieldsValidator - setOption()'); - $I->skipTest('Need implementation'); - } -} diff --git a/tests/integration/Validation/CombinedFieldsValidator/ValidateCest.php b/tests/integration/Validation/CombinedFieldsValidator/ValidateCest.php deleted file mode 100644 index 0d43d6e467c..00000000000 --- a/tests/integration/Validation/CombinedFieldsValidator/ValidateCest.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE.txt - * file that was distributed with this source code. - */ - -namespace Phalcon\Test\Integration\Validation\CombinedFieldsValidator; - -use IntegrationTester; - -/** - * Class ValidateCest - */ -class ValidateCest -{ - /** - * Tests Phalcon\Validation\CombinedFieldsValidator :: validate() - * - * @author Phalcon Team - * @since 2018-11-13 - */ - public function validationCombinedfieldsvalidatorValidate(IntegrationTester $I) - { - $I->wantToTest('Validation\CombinedFieldsValidator - validate()'); - $I->skipTest('Need implementation'); - } -}