From d5a0b0b2f277cfc89f099f84789ebf4ca56ee31b Mon Sep 17 00:00:00 2001 From: Nikolaos Dimopoulos Date: Mon, 1 Jul 2019 11:59:17 -0400 Subject: [PATCH] [#14213] - References corrections --- tests/_data/fixtures/models/Abonnes.php | 1 - tests/_data/fixtures/models/Subscriptores.php | 1 - tests/_data/fixtures/models/Validation/Robots.php | 1 - .../fixtures/models/Validation/Subscriptores.php | 1 - tests/cli/Cli/Dispatcher/DispatchCest.php | 4 ++-- tests/cli/Cli/Dispatcher/GetHandlerSuffixCest.php | 2 +- .../integration/Db/Adapter/Pdo/Mysql/QueryCest.php | 10 +++++----- .../Db/Adapter/Pdo/Postgresql/QueryCest.php | 10 +++++----- .../Db/Adapter/Pdo/Sqlite/QueryCest.php | 9 ++++----- tests/integration/Db/DbCest.php | 14 +++++++------- .../Firewall/Adapter/Acl/AfterBindingCest.php | 4 ++-- .../Adapter/Acl/BeforeExecuteRouteCest.php | 4 ++-- .../Adapter/Acl/GetSetDefaultAccessCest.php | 6 +++--- .../Adapter/Acl/SetBoundModelsKeyMapCest.php | 4 ++-- .../Firewall/Adapter/Acl/SetCacheCest.php | 4 ++-- .../Acl/UseMultiModuleConfigurationCest.php | 4 ++-- .../Annotations/GetSetDefaultAccessCest.php | 6 +++--- .../Adapter/Micro/Acl/AfterBindingCest.php | 4 ++-- .../Adapter/Micro/Acl/BeforeExecuteRouteCest.php | 4 ++-- .../Adapter/Micro/Acl/GetSetDefaultAccessCest.php | 6 +++--- .../Adapter/Micro/Acl/SetBoundModelsKeyMapCest.php | 4 ++-- .../Firewall/Adapter/Micro/Acl/SetCacheCest.php | 4 ++-- .../Micro/Acl/SetRouteNameConfigurationCest.php | 4 ++-- tests/integration/Forms/Form/GetMessagesCest.php | 1 - tests/integration/Forms/Form/SetValidationCest.php | 1 - tests/integration/Mvc/Dispatcher/DispatchCest.php | 6 +++--- .../Mvc/Dispatcher/Helper/BaseDispatcher.php | 3 ++- .../Mvc/Dispatcher/Helper/DispatcherListener.php | 2 +- .../Mvc/Model/Refactor-DynamicOperationsCest.php | 2 +- .../Mvc/Model/Transaction/GetConnectionCest.php | 2 +- 30 files changed, 61 insertions(+), 67 deletions(-) diff --git a/tests/_data/fixtures/models/Abonnes.php b/tests/_data/fixtures/models/Abonnes.php index 0dc5d71b655..9d0afc54466 100644 --- a/tests/_data/fixtures/models/Abonnes.php +++ b/tests/_data/fixtures/models/Abonnes.php @@ -13,7 +13,6 @@ use Phalcon\Messages\Message; use Phalcon\Mvc\Model; -use Phalcon\Validation; use Phalcon\Validation\Validator\Email as EmailValidator; use Phalcon\Validation\Validator\ExclusionIn as ExclusionInValidator; use Phalcon\Validation\Validator\InclusionIn as InclusionInValidator; diff --git a/tests/_data/fixtures/models/Subscriptores.php b/tests/_data/fixtures/models/Subscriptores.php index a5b092b9c3b..a591a0633ad 100644 --- a/tests/_data/fixtures/models/Subscriptores.php +++ b/tests/_data/fixtures/models/Subscriptores.php @@ -13,7 +13,6 @@ use Phalcon\Messages\Message; use Phalcon\Mvc\Model; -use Phalcon\Validation; use Phalcon\Validation\Validator\Email as EmailValidator; use Phalcon\Validation\Validator\ExclusionIn as ExclusionInValidator; use Phalcon\Validation\Validator\InclusionIn as InclusionInValidator; diff --git a/tests/_data/fixtures/models/Validation/Robots.php b/tests/_data/fixtures/models/Validation/Robots.php index a5e69554011..788923e1164 100644 --- a/tests/_data/fixtures/models/Validation/Robots.php +++ b/tests/_data/fixtures/models/Validation/Robots.php @@ -14,7 +14,6 @@ use Phalcon\Mvc\Model; use Phalcon\Mvc\Model\Resultset\Simple; use Phalcon\Test\Models\RobotsParts; -use Phalcon\Validation; use Phalcon\Validation\Validator\StringLength; /** diff --git a/tests/_data/fixtures/models/Validation/Subscriptores.php b/tests/_data/fixtures/models/Validation/Subscriptores.php index ec25a90b2b4..4d29ef52a74 100644 --- a/tests/_data/fixtures/models/Validation/Subscriptores.php +++ b/tests/_data/fixtures/models/Validation/Subscriptores.php @@ -13,7 +13,6 @@ use Phalcon\Messages\Message; use Phalcon\Mvc\Model; -use Phalcon\Validation; use Phalcon\Validation\Validator\Email; use Phalcon\Validation\Validator\ExclusionIn; use Phalcon\Validation\Validator\InclusionIn; diff --git a/tests/cli/Cli/Dispatcher/DispatchCest.php b/tests/cli/Cli/Dispatcher/DispatchCest.php index 8b56d40bebf..5ea5b3f7b83 100644 --- a/tests/cli/Cli/Dispatcher/DispatchCest.php +++ b/tests/cli/Cli/Dispatcher/DispatchCest.php @@ -13,8 +13,8 @@ namespace Phalcon\Test\Cli\Cli\Dispatcher; use CliTester; -use Exception; use Phalcon\Cli\Dispatcher; +use Phalcon\Cli\Dispatcher\Exception; use Phalcon\Test\Fixtures\Traits\DiTrait; class DispatchCest @@ -58,7 +58,7 @@ public function testFakeNamespace(CliTester $I) $I->expectThrowable( new Exception( 'Dummy\MainTask handler class cannot be loaded', - Dispatcher::EXCEPTION_HANDLER_NOT_FOUND + Exception::EXCEPTION_HANDLER_NOT_FOUND ), function () use ($dispatcher) { $dispatcher->dispatch(); diff --git a/tests/cli/Cli/Dispatcher/GetHandlerSuffixCest.php b/tests/cli/Cli/Dispatcher/GetHandlerSuffixCest.php index ca2a899c776..c94cbdb0093 100644 --- a/tests/cli/Cli/Dispatcher/GetHandlerSuffixCest.php +++ b/tests/cli/Cli/Dispatcher/GetHandlerSuffixCest.php @@ -51,7 +51,7 @@ public function cliDispatcherGetHandlerSuffix(CliTester $I) $I->expectThrowable( new Exception( 'IndexBleh handler class cannot be loaded', - Dispatcher::EXCEPTION_HANDLER_NOT_FOUND + Exception::EXCEPTION_HANDLER_NOT_FOUND ), function () use ($dispatcher) { $dispatcher->dispatch(); diff --git a/tests/integration/Db/Adapter/Pdo/Mysql/QueryCest.php b/tests/integration/Db/Adapter/Pdo/Mysql/QueryCest.php index ec2c858551b..64944619e4a 100644 --- a/tests/integration/Db/Adapter/Pdo/Mysql/QueryCest.php +++ b/tests/integration/Db/Adapter/Pdo/Mysql/QueryCest.php @@ -13,7 +13,7 @@ namespace Phalcon\Test\Integration\Db\Adapter\Pdo\Mysql; use IntegrationTester; -use Phalcon\Db; +use Phalcon\Db\Enum; use Phalcon\Test\Fixtures\Traits\DiTrait; class QueryCest @@ -75,7 +75,7 @@ public function dbAdapterPdoMysqlQuery(IntegrationTester $I) $result = $connection->query('SELECT * FROM personas LIMIT 5'); - $result->setFetchMode(Db::FETCH_NUM); + $result->setFetchMode(Enum::FETCH_NUM); $row = $result->fetch(); $I->assertInternalType('array', $row); $I->assertCount(11, $row); @@ -86,7 +86,7 @@ public function dbAdapterPdoMysqlQuery(IntegrationTester $I) $result = $connection->query('SELECT * FROM personas LIMIT 5'); - $result->setFetchMode(Db::FETCH_ASSOC); + $result->setFetchMode(Enum::FETCH_ASSOC); $row = $result->fetch(); $I->assertInternalType('array', $row); $I->assertCount(11, $row); @@ -97,7 +97,7 @@ public function dbAdapterPdoMysqlQuery(IntegrationTester $I) $result = $connection->query('SELECT * FROM personas LIMIT 5'); - $result->setFetchMode(Db::FETCH_OBJ); + $result->setFetchMode(Enum::FETCH_OBJ); $row = $result->fetch(); $I->assertInternalType('object', $row); $I->assertTrue(isset($row->cedula)); @@ -105,7 +105,7 @@ public function dbAdapterPdoMysqlQuery(IntegrationTester $I) $result = $connection->query('SELECT * FROM personas LIMIT 5'); - $result->setFetchMode(Db::FETCH_BOTH); + $result->setFetchMode(Enum::FETCH_BOTH); $result->dataSeek(4); $row = $result->fetch(); $row = $result->fetch(); diff --git a/tests/integration/Db/Adapter/Pdo/Postgresql/QueryCest.php b/tests/integration/Db/Adapter/Pdo/Postgresql/QueryCest.php index 151c93a3ca1..8d726c2c2d0 100644 --- a/tests/integration/Db/Adapter/Pdo/Postgresql/QueryCest.php +++ b/tests/integration/Db/Adapter/Pdo/Postgresql/QueryCest.php @@ -13,7 +13,7 @@ namespace Phalcon\Test\Integration\Db\Adapter\Pdo\Postgresql; use IntegrationTester; -use Phalcon\Db; +use Phalcon\Db\Enum; use Phalcon\Test\Fixtures\Traits\DiTrait; class QueryCest @@ -75,7 +75,7 @@ public function dbAdapterPdoPostgresqlQuery(IntegrationTester $I) $result = $connection->query('SELECT * FROM personas LIMIT 5'); - $result->setFetchMode(Db::FETCH_NUM); + $result->setFetchMode(Enum::FETCH_NUM); $row = $result->fetch(); $I->assertInternalType('array', $row); $I->assertCount(11, $row); @@ -86,7 +86,7 @@ public function dbAdapterPdoPostgresqlQuery(IntegrationTester $I) $result = $connection->query('SELECT * FROM personas LIMIT 5'); - $result->setFetchMode(Db::FETCH_ASSOC); + $result->setFetchMode(Enum::FETCH_ASSOC); $row = $result->fetch(); $I->assertInternalType('array', $row); $I->assertCount(11, $row); @@ -97,7 +97,7 @@ public function dbAdapterPdoPostgresqlQuery(IntegrationTester $I) $result = $connection->query('SELECT * FROM personas LIMIT 5'); - $result->setFetchMode(Db::FETCH_OBJ); + $result->setFetchMode(Enum::FETCH_OBJ); $row = $result->fetch(); $I->assertInternalType('object', $row); $I->assertTrue(isset($row->cedula)); @@ -105,7 +105,7 @@ public function dbAdapterPdoPostgresqlQuery(IntegrationTester $I) $result = $connection->query('SELECT * FROM personas LIMIT 5'); - $result->setFetchMode(Db::FETCH_BOTH); + $result->setFetchMode(Enum::FETCH_BOTH); $result->dataSeek(4); $row = $result->fetch(); $row = $result->fetch(); diff --git a/tests/integration/Db/Adapter/Pdo/Sqlite/QueryCest.php b/tests/integration/Db/Adapter/Pdo/Sqlite/QueryCest.php index 35c03d30dc4..bf4136ae24b 100644 --- a/tests/integration/Db/Adapter/Pdo/Sqlite/QueryCest.php +++ b/tests/integration/Db/Adapter/Pdo/Sqlite/QueryCest.php @@ -13,7 +13,6 @@ namespace Phalcon\Test\Integration\Db\Adapter\Pdo\Sqlite; use IntegrationTester; -use Phalcon\Db; use Phalcon\Test\Fixtures\Traits\DiTrait; class QueryCest @@ -70,7 +69,7 @@ public function dbAdapterPdoSqliteQuery(IntegrationTester $I) $result = $connection->query('SELECT * FROM personas LIMIT 5'); - $result->setFetchMode(Db::FETCH_NUM); + $result->setFetchMode(Enum::FETCH_NUM); $row = $result->fetch(); $I->assertInternalType('array', $row); $I->assertCount(11, $row); @@ -81,7 +80,7 @@ public function dbAdapterPdoSqliteQuery(IntegrationTester $I) $result = $connection->query('SELECT * FROM personas LIMIT 5'); - $result->setFetchMode(Db::FETCH_ASSOC); + $result->setFetchMode(Enum::FETCH_ASSOC); $row = $result->fetch(); $I->assertInternalType('array', $row); $I->assertCount(11, $row); @@ -92,7 +91,7 @@ public function dbAdapterPdoSqliteQuery(IntegrationTester $I) $result = $connection->query('SELECT * FROM personas LIMIT 5'); - $result->setFetchMode(Db::FETCH_OBJ); + $result->setFetchMode(Enum::FETCH_OBJ); $row = $result->fetch(); $I->assertInternalType('object', $row); $I->assertTrue(isset($row->cedula)); @@ -100,7 +99,7 @@ public function dbAdapterPdoSqliteQuery(IntegrationTester $I) $result = $connection->query('SELECT * FROM personas LIMIT 5'); - $result->setFetchMode(Db::FETCH_BOTH); + $result->setFetchMode(Enum::FETCH_BOTH); $result->dataSeek(4); $row = $result->fetch(); $row = $result->fetch(); diff --git a/tests/integration/Db/DbCest.php b/tests/integration/Db/DbCest.php index bf691e94506..c9245c5e896 100644 --- a/tests/integration/Db/DbCest.php +++ b/tests/integration/Db/DbCest.php @@ -14,7 +14,7 @@ use Codeception\Example; use IntegrationTester; use PDO; -use Phalcon\Db; +use Phalcon\Db\Enum; use Phalcon\Db\RawValue; use Phalcon\Test\Fixtures\Traits\DiTrait; @@ -223,7 +223,7 @@ public function db(IntegrationTester $I, Example $example) $row = $connection->fetchOne( 'select count(*) as cnt from prueba where nombre=? and estado=?', - Db::FETCH_ASSOC, + Enum::FETCH_ASSOC, [ 'LOL array syntax 2', 'X', ] @@ -252,7 +252,7 @@ public function db(IntegrationTester $I, Example $example) $row = $connection->fetchOne( 'select count(*) as cnt from prueba where nombre=? and estado=?', - Db::FETCH_ASSOC, + Enum::FETCH_ASSOC, [ 'LOL array syntax 3', 'E', ] @@ -272,7 +272,7 @@ public function db(IntegrationTester $I, Example $example) $row = $connection->fetchOne( 'select count(*) as cnt from prueba where nombre=? and estado=?', - Db::FETCH_ASSOC, + Enum::FETCH_ASSOC, [ 'LOL insertAsDict', 'E', ] @@ -292,7 +292,7 @@ public function db(IntegrationTester $I, Example $example) $row = $connection->fetchOne( 'select count(*) as cnt from prueba where nombre=? and estado=?', - Db::FETCH_ASSOC, + Enum::FETCH_ASSOC, [ 'LOL updateAsDict', 'X', ] @@ -319,7 +319,7 @@ public function db(IntegrationTester $I, Example $example) $I->assertCount( 11, - $connection->fetchOne('SELECT * FROM personas', Db::FETCH_NUM) + $connection->fetchOne('SELECT * FROM personas', Enum::FETCH_NUM) ); $I->assertCount( @@ -329,7 +329,7 @@ public function db(IntegrationTester $I, Example $example) $rows = $connection->fetchAll( 'SELECT * FROM personas LIMIT 10', - Db::FETCH_NUM + Enum::FETCH_NUM ); $I->assertCount(10, $rows); $I->assertCount(11, $rows[0]); diff --git a/tests/integration/Firewall/Adapter/Acl/AfterBindingCest.php b/tests/integration/Firewall/Adapter/Acl/AfterBindingCest.php index d5bec7a8c77..18b0faed93b 100644 --- a/tests/integration/Firewall/Adapter/Acl/AfterBindingCest.php +++ b/tests/integration/Firewall/Adapter/Acl/AfterBindingCest.php @@ -17,7 +17,7 @@ use function ob_end_clean; use function ob_start; use Phalcon\Acl\Adapter\Memory; -use Phalcon\Acl as PhAcl; +use Phalcon\Acl\Enum; use Phalcon\Events\Manager; use Phalcon\Firewall\Adapter\Acl; use Phalcon\Mvc\Dispatcher; @@ -96,7 +96,7 @@ public function firewallAdapterAclAfterBinding(IntegrationTester $I, Example $ex $I->wantToTest('Firewall\Adapter\Acl - afterBinding()'); $acl = new Memory(); - $acl->setDefaultAction(PhAcl::DENY); + $acl->setDefaultAction(Enum::DENY); $acl->addComponent('Four', ['first', 'second']); $acl->addRole('ROLE1'); $acl->addRole('ROLE2'); diff --git a/tests/integration/Firewall/Adapter/Acl/BeforeExecuteRouteCest.php b/tests/integration/Firewall/Adapter/Acl/BeforeExecuteRouteCest.php index a0566b1b24d..0af5ef732f0 100644 --- a/tests/integration/Firewall/Adapter/Acl/BeforeExecuteRouteCest.php +++ b/tests/integration/Firewall/Adapter/Acl/BeforeExecuteRouteCest.php @@ -16,7 +16,7 @@ use function ob_end_clean; use function ob_start; use Phalcon\Acl\Adapter\Memory; -use Phalcon\Acl as PhAcl; +use Phalcon\Acl\Enum; use Phalcon\Events\Manager; use Phalcon\Firewall\Adapter\Acl; use Phalcon\Mvc\Dispatcher; @@ -100,7 +100,7 @@ public function firewallAdapterAclBeforeExecuteRoute(IntegrationTester $I) $acl = new Memory(); - $acl->setDefaultAction(PhAcl::DENY); + $acl->setDefaultAction(Enum::DENY); $acl->addComponent('One', ['firstRole', 'secondRole']); diff --git a/tests/integration/Firewall/Adapter/Acl/GetSetDefaultAccessCest.php b/tests/integration/Firewall/Adapter/Acl/GetSetDefaultAccessCest.php index f1efb9d6934..08ae0f06070 100644 --- a/tests/integration/Firewall/Adapter/Acl/GetSetDefaultAccessCest.php +++ b/tests/integration/Firewall/Adapter/Acl/GetSetDefaultAccessCest.php @@ -13,7 +13,7 @@ namespace Phalcon\Test\Integration\Firewall\Adapter\Acl; use IntegrationTester; -use Phalcon\Acl as PhAcl; +use Phalcon\Acl\Enum; use Phalcon\Firewall\Adapter\Acl; class GetSetDefaultAccessCest @@ -29,9 +29,9 @@ public function firewallAdapterAclGetDefaultAccess(IntegrationTester $I) $I->wantToTest('Firewall\Adapter\Acl - getDefaultAccess()'); $firewall = new Acl('acl'); - $firewall->setDefaultAccess(PhAcl::ALLOW); + $firewall->setDefaultAccess(Enum::ALLOW); $actual = $firewall->getDefaultAccess(); - $I->assertEquals(PhAcl::ALLOW, $actual); + $I->assertEquals(Enum::ALLOW, $actual); } } diff --git a/tests/integration/Firewall/Adapter/Acl/SetBoundModelsKeyMapCest.php b/tests/integration/Firewall/Adapter/Acl/SetBoundModelsKeyMapCest.php index a8162de9193..b90a6949c85 100644 --- a/tests/integration/Firewall/Adapter/Acl/SetBoundModelsKeyMapCest.php +++ b/tests/integration/Firewall/Adapter/Acl/SetBoundModelsKeyMapCest.php @@ -16,7 +16,7 @@ use function ob_end_clean; use function ob_start; use Phalcon\Acl\Adapter\Memory; -use Phalcon\Acl as PhAcl; +use Phalcon\Acl\Enum; use Phalcon\Events\Manager; use Phalcon\Firewall\Adapter\Acl; use Phalcon\Mvc\Dispatcher; @@ -93,7 +93,7 @@ public function firewallAdapterAclSetBoundModelsKeyMap(IntegrationTester $I) $I->wantToTest('Firewall\Adapter\Acl - setBoundModelsKeyMap()'); $acl = new Memory(); - $acl->setDefaultAction(PhAcl::DENY); + $acl->setDefaultAction(Enum::DENY); $acl->addComponent('Four', ['first', 'second']); $acl->addRole('ROLE2'); $acl->allow( diff --git a/tests/integration/Firewall/Adapter/Acl/SetCacheCest.php b/tests/integration/Firewall/Adapter/Acl/SetCacheCest.php index df3ad8063cf..6fe63f2a39a 100644 --- a/tests/integration/Firewall/Adapter/Acl/SetCacheCest.php +++ b/tests/integration/Firewall/Adapter/Acl/SetCacheCest.php @@ -16,7 +16,7 @@ use function ob_end_clean; use function ob_start; use Phalcon\Acl\Adapter\Memory; -use Phalcon\Acl as PhAcl; +use Phalcon\Acl\Enum; use Phalcon\Cache\AdapterFactory; use Phalcon\Events\Manager; use Phalcon\Firewall\Adapter\Acl; @@ -95,7 +95,7 @@ public function firewallAdapterAclSetCache(IntegrationTester $I) $I->wantToTest('Firewall\Adapter\Acl - setCache()'); $acl = new Memory(); - $acl->setDefaultAction(PhAcl::DENY); + $acl->setDefaultAction(Enum::DENY); $acl->addComponent('Four', ['first', 'second']); $acl->addComponent('Three', ['deny',]); $acl->addRole('ROLE1'); diff --git a/tests/integration/Firewall/Adapter/Acl/UseMultiModuleConfigurationCest.php b/tests/integration/Firewall/Adapter/Acl/UseMultiModuleConfigurationCest.php index bff8460b669..47f2e07bdd4 100644 --- a/tests/integration/Firewall/Adapter/Acl/UseMultiModuleConfigurationCest.php +++ b/tests/integration/Firewall/Adapter/Acl/UseMultiModuleConfigurationCest.php @@ -16,7 +16,7 @@ use function ob_end_clean; use function ob_start; use Phalcon\Acl\Adapter\Memory; -use Phalcon\Acl as PhAcl; +use Phalcon\Acl\Enum; use Phalcon\Events\Manager; use Phalcon\Firewall\Adapter\Acl; use Phalcon\Mvc\Dispatcher; @@ -90,7 +90,7 @@ public function firewallAdapterAclUseMultiModuleConfiguration(IntegrationTester $I->wantToTest('Firewall\Adapter\Acl - useMultiModuleConfiguration()'); $acl = new Memory(); - $acl->setDefaultAction(PhAcl::DENY); + $acl->setDefaultAction(Enum::DENY); $acl->addComponent('Module1:One', ['firstRole', 'secondRole']); $acl->addComponent('Module2:One', ['firstRole', 'secondRole']); $acl->addRole('ROLE1'); diff --git a/tests/integration/Firewall/Adapter/Annotations/GetSetDefaultAccessCest.php b/tests/integration/Firewall/Adapter/Annotations/GetSetDefaultAccessCest.php index ac93325d344..1cfb629516c 100644 --- a/tests/integration/Firewall/Adapter/Annotations/GetSetDefaultAccessCest.php +++ b/tests/integration/Firewall/Adapter/Annotations/GetSetDefaultAccessCest.php @@ -13,7 +13,7 @@ namespace Phalcon\Test\Integration\Firewall\Adapter\Annotations; use IntegrationTester; -use Phalcon\Acl as PhAcl; +use Phalcon\Acl\Enum; use Phalcon\Annotations\Adapter\Memory; use Phalcon\Firewall\Adapter\Annotations; @@ -31,9 +31,9 @@ public function firewallAdapterAnnotationsGetSetDefaultAccess(IntegrationTester $I->wantToTest('Firewall\Adapter\Annotations - getDefaultAccess()/setDefaultAccess()'); $firewall = new Annotations(new Memory()); - $firewall->setDefaultAccess(PhAcl::ALLOW); + $firewall->setDefaultAccess(Enum::ALLOW); $actual = $firewall->getDefaultAccess(); - $I->assertEquals(PhAcl::ALLOW, $actual); + $I->assertEquals(Enum::ALLOW, $actual); } } diff --git a/tests/integration/Firewall/Adapter/Micro/Acl/AfterBindingCest.php b/tests/integration/Firewall/Adapter/Micro/Acl/AfterBindingCest.php index 6946e4a4e45..c9a3ec9bcf7 100644 --- a/tests/integration/Firewall/Adapter/Micro/Acl/AfterBindingCest.php +++ b/tests/integration/Firewall/Adapter/Micro/Acl/AfterBindingCest.php @@ -16,7 +16,7 @@ use function ob_end_clean; use function ob_start; use Phalcon\Acl\Adapter\Memory; -use Phalcon\Acl as PhAcl; +use Phalcon\Acl\Enum; use Phalcon\Events\Manager; use Phalcon\Firewall\Adapter\Micro\Acl; use Phalcon\Mvc\Micro; @@ -128,7 +128,7 @@ public function firewallAdapterMicroAclAfterBinding(IntegrationTester $I) ] ); - $acl->setDefaultAction(PhAcl::DENY); + $acl->setDefaultAction(Enum::DENY); $acl->addRole('ROLE1'); $acl->addRole('ROLE2'); diff --git a/tests/integration/Firewall/Adapter/Micro/Acl/BeforeExecuteRouteCest.php b/tests/integration/Firewall/Adapter/Micro/Acl/BeforeExecuteRouteCest.php index 3919209eea0..af120b5c8af 100644 --- a/tests/integration/Firewall/Adapter/Micro/Acl/BeforeExecuteRouteCest.php +++ b/tests/integration/Firewall/Adapter/Micro/Acl/BeforeExecuteRouteCest.php @@ -16,7 +16,7 @@ use function ob_end_clean; use function ob_start; use Phalcon\Acl\Adapter\Memory; -use Phalcon\Acl as PhAcl; +use Phalcon\Acl\Enum; use Phalcon\Events\Manager; use Phalcon\Firewall\Adapter\Micro\Acl; use Phalcon\Mvc\Micro; @@ -133,7 +133,7 @@ public function firewallAdapterMicroAclBeforeExecuteRoute(IntegrationTester $I) ] ); - $acl->setDefaultAction(PhAcl::DENY); + $acl->setDefaultAction(Enum::DENY); $acl->addRole('ROLE1'); $acl->addRole('ROLE2'); diff --git a/tests/integration/Firewall/Adapter/Micro/Acl/GetSetDefaultAccessCest.php b/tests/integration/Firewall/Adapter/Micro/Acl/GetSetDefaultAccessCest.php index 8d2489e8d92..7ce813f5bb7 100644 --- a/tests/integration/Firewall/Adapter/Micro/Acl/GetSetDefaultAccessCest.php +++ b/tests/integration/Firewall/Adapter/Micro/Acl/GetSetDefaultAccessCest.php @@ -13,7 +13,7 @@ namespace Phalcon\Test\Integration\Firewall\Adapter\Micro\Acl; use IntegrationTester; -use Phalcon\Acl as PhAcl; +use Phalcon\Acl\Enum; use Phalcon\Firewall\Adapter\Micro\Acl; class GetSetDefaultAccessCest @@ -30,9 +30,9 @@ public function firewallAdapterMicroAclGetSetDefaultAccess(IntegrationTester $I) $I->wantToTest('Firewall\Adapter\Micro\Acl - getDefaultAccess()/setDefaultAccess()'); $firewall = new Acl('acl'); - $firewall->setDefaultAccess(PhAcl::ALLOW); + $firewall->setDefaultAccess(Enum::ALLOW); $actual = $firewall->getDefaultAccess(); - $I->assertEquals(PhAcl::ALLOW, $actual); + $I->assertEquals(Enum::ALLOW, $actual); } } diff --git a/tests/integration/Firewall/Adapter/Micro/Acl/SetBoundModelsKeyMapCest.php b/tests/integration/Firewall/Adapter/Micro/Acl/SetBoundModelsKeyMapCest.php index fe407801177..05330bf40f3 100644 --- a/tests/integration/Firewall/Adapter/Micro/Acl/SetBoundModelsKeyMapCest.php +++ b/tests/integration/Firewall/Adapter/Micro/Acl/SetBoundModelsKeyMapCest.php @@ -16,7 +16,7 @@ use function ob_end_clean; use function ob_start; use Phalcon\Acl\Adapter\Memory; -use Phalcon\Acl as PhAcl; +use Phalcon\Acl\Enum; use Phalcon\Events\Manager; use Phalcon\Firewall\Adapter\Micro\Acl; use Phalcon\Mvc\Micro; @@ -117,7 +117,7 @@ public function firewallAdapterMicroAclSetBoundModelsKeyMap(IntegrationTester $I $acl = new Memory(); $acl->addComponent('Micro', ['album-get', 'album-update']); - $acl->setDefaultAction(PhAcl::DENY); + $acl->setDefaultAction(Enum::DENY); $acl->addRole('ROLE1'); $acl->addRole('ROLE2'); $acl->allow( diff --git a/tests/integration/Firewall/Adapter/Micro/Acl/SetCacheCest.php b/tests/integration/Firewall/Adapter/Micro/Acl/SetCacheCest.php index c1d9e31be5c..bb252442f1f 100644 --- a/tests/integration/Firewall/Adapter/Micro/Acl/SetCacheCest.php +++ b/tests/integration/Firewall/Adapter/Micro/Acl/SetCacheCest.php @@ -16,7 +16,7 @@ use function ob_end_clean; use function ob_start; use Phalcon\Acl\Adapter\Memory; -use Phalcon\Acl as PhAcl; +use Phalcon\Acl\Enum; use Phalcon\Cache\AdapterFactory; use Phalcon\Events\Manager; use Phalcon\Firewall\Adapter\Micro\Acl; @@ -119,7 +119,7 @@ public function firewallAdapterMicroAclSetCache(IntegrationTester $I) $acl = new Memory(); $acl->addComponent('Micro', ['album-get']); - $acl->setDefaultAction(PhAcl::DENY); + $acl->setDefaultAction(Enum::DENY); $acl->addRole('ROLE1'); $acl->addRole('ROLE2'); $acl->addRole('ROLE3'); diff --git a/tests/integration/Firewall/Adapter/Micro/Acl/SetRouteNameConfigurationCest.php b/tests/integration/Firewall/Adapter/Micro/Acl/SetRouteNameConfigurationCest.php index c608752e8ce..914dbc2a8f3 100644 --- a/tests/integration/Firewall/Adapter/Micro/Acl/SetRouteNameConfigurationCest.php +++ b/tests/integration/Firewall/Adapter/Micro/Acl/SetRouteNameConfigurationCest.php @@ -16,7 +16,7 @@ use function ob_end_clean; use function ob_start; use Phalcon\Acl\Adapter\Memory; -use Phalcon\Acl as PhAcl; +use Phalcon\Acl\Enum; use Phalcon\Events\Manager; use Phalcon\Firewall\Adapter\Micro\Acl; use Phalcon\Mvc\Micro; @@ -115,7 +115,7 @@ public function firewallAdapterMicroAclSetRouteNameConfiguration(IntegrationTest $acl = new Memory(); $acl->addComponent('Micro', ['/test', '/test2']); - $acl->setDefaultAction(PhAcl::DENY); + $acl->setDefaultAction(Enum::DENY); $acl->addRole('ROLE1'); $acl->addRole('ROLE2'); $acl->addRole('ROLE3'); diff --git a/tests/integration/Forms/Form/GetMessagesCest.php b/tests/integration/Forms/Form/GetMessagesCest.php index f347397576f..f2ca9cf529a 100644 --- a/tests/integration/Forms/Form/GetMessagesCest.php +++ b/tests/integration/Forms/Form/GetMessagesCest.php @@ -19,7 +19,6 @@ use Phalcon\Messages\Messages; use Phalcon\Tag; use Phalcon\Test\Fixtures\Traits\DiTrait; -use Phalcon\Validation; use Phalcon\Validation\Validator\PresenceOf; use Phalcon\Validation\Validator\Regex; diff --git a/tests/integration/Forms/Form/SetValidationCest.php b/tests/integration/Forms/Form/SetValidationCest.php index 890dcdea80c..6745851f777 100644 --- a/tests/integration/Forms/Form/SetValidationCest.php +++ b/tests/integration/Forms/Form/SetValidationCest.php @@ -19,7 +19,6 @@ use Phalcon\Messages\Messages; use Phalcon\Tag; use Phalcon\Test\Fixtures\Traits\DiTrait; -use Phalcon\Validation; use Phalcon\Validation\Validator\Regex; /** diff --git a/tests/integration/Mvc/Dispatcher/DispatchCest.php b/tests/integration/Mvc/Dispatcher/DispatchCest.php index 0f4ea8bae8a..64a56294372 100644 --- a/tests/integration/Mvc/Dispatcher/DispatchCest.php +++ b/tests/integration/Mvc/Dispatcher/DispatchCest.php @@ -14,7 +14,7 @@ use Exception; use IntegrationTester; -use Phalcon\Dispatcher; +use Phalcon\Dispatcher\DispatcherInterface; use Phalcon\Test\Integration\Mvc\Dispatcher\Helper\BaseDispatcher; use Phalcon\Test\Integration\Mvc\Dispatcher\Helper\DispatcherTestDefaultController; @@ -100,7 +100,7 @@ public function testHandlerNotFound(IntegrationTester $I) new Exception( 'Phalcon\Test\Integration\Mvc\Dispatcher\Helper\Non' . 'ExistentDispatcherHandlerController handler class cannot be loaded', - Dispatcher::EXCEPTION_HANDLER_NOT_FOUND + Exception::EXCEPTION_HANDLER_NOT_FOUND ), function () use ($dispatcher) { $dispatcher->dispatch(); @@ -123,7 +123,7 @@ public function testHandlerActionNotFound(IntegrationTester $I) $I->expectThrowable( new Exception( "Action 'Invalid-Dispatcher-Action-Name' was not found on handler 'dispatcher-test-default'", - Dispatcher::EXCEPTION_ACTION_NOT_FOUND + Exception::EXCEPTION_ACTION_NOT_FOUND ), function () use ($dispatcher) { $dispatcher->dispatch(); diff --git a/tests/integration/Mvc/Dispatcher/Helper/BaseDispatcher.php b/tests/integration/Mvc/Dispatcher/Helper/BaseDispatcher.php index 5ff979296dc..dde1f36f165 100644 --- a/tests/integration/Mvc/Dispatcher/Helper/BaseDispatcher.php +++ b/tests/integration/Mvc/Dispatcher/Helper/BaseDispatcher.php @@ -4,6 +4,7 @@ use IntegrationTester; use Phalcon\Di; +use Phalcon\Dispatcher\DispatcherInterface; use Phalcon\Events\Manager as EventsManager; use Phalcon\Http\Response; use Phalcon\Mvc\Dispatcher; @@ -96,7 +97,7 @@ protected function getDI(): Di /** * Returns the current dispatcher instance. */ - protected function getDispatcher(): Dispatcher + protected function getDispatcher(): DispatcherInterface { return $this->di->getShared('dispatcher'); } diff --git a/tests/integration/Mvc/Dispatcher/Helper/DispatcherListener.php b/tests/integration/Mvc/Dispatcher/Helper/DispatcherListener.php index 02e3b0869d5..3787080bd7e 100644 --- a/tests/integration/Mvc/Dispatcher/Helper/DispatcherListener.php +++ b/tests/integration/Mvc/Dispatcher/Helper/DispatcherListener.php @@ -3,7 +3,7 @@ namespace Phalcon\Test\Integration\Mvc\Dispatcher\Helper; use Exception; -use Phalcon\DispatcherInterface; +use Phalcon\Dispatcher\DispatcherInterface; use Phalcon\Events\Event; /** diff --git a/tests/integration/Mvc/Model/Refactor-DynamicOperationsCest.php b/tests/integration/Mvc/Model/Refactor-DynamicOperationsCest.php index 186fcd716f7..aff5ee03dd4 100644 --- a/tests/integration/Mvc/Model/Refactor-DynamicOperationsCest.php +++ b/tests/integration/Mvc/Model/Refactor-DynamicOperationsCest.php @@ -13,7 +13,7 @@ use DateTime; use IntegrationTester; -use Phalcon\Db\AdapterInterface; +use Phalcon\Db\Adapter\AdapterInterface; use Phalcon\Db\RawValue; use Phalcon\Events\Event; use Phalcon\Test\Fixtures\Traits\DiTrait; diff --git a/tests/integration/Mvc/Model/Transaction/GetConnectionCest.php b/tests/integration/Mvc/Model/Transaction/GetConnectionCest.php index 438aeda45db..2be6666e047 100644 --- a/tests/integration/Mvc/Model/Transaction/GetConnectionCest.php +++ b/tests/integration/Mvc/Model/Transaction/GetConnectionCest.php @@ -13,7 +13,7 @@ namespace Phalcon\Test\Integration\Mvc\Model\Transaction; use IntegrationTester; -use Phalcon\Db\AdapterInterface; +use Phalcon\Db\Adapter\AdapterInterface; use Phalcon\Test\Fixtures\Traits\DiTrait; class GetConnectionCest