diff --git a/tests/integration/Mvc/Model/Refactor-ModelsRelationsMagicCest.php b/tests/integration/Mvc/Model/Refactor-ModelsRelationsMagicCest.php index b5bbf550ba2..e62edf2df30 100644 --- a/tests/integration/Mvc/Model/Refactor-ModelsRelationsMagicCest.php +++ b/tests/integration/Mvc/Model/Refactor-ModelsRelationsMagicCest.php @@ -4,6 +4,7 @@ use IntegrationTester; use Phalcon\Mvc\Model\AbstractModel; +use Phalcon\Mvc\Model\Enum; use Phalcon\Test\Fixtures\Traits\DiTrait; use Phalcon\Test\Models\AlbumORama\Albums; use Phalcon\Test\Models\AlbumORama\Artists; @@ -107,7 +108,7 @@ private function executeSaveRelatedBelongsTo(IntegrationTester $I) // //The artists must no be saved $I->assertEquals( - Model::DIRTY_STATE_TRANSIENT, + Enum::DIRTY_STATE_TRANSIENT, $artist->getDirtyState() ); @@ -133,12 +134,12 @@ private function executeSaveRelatedBelongsTo(IntegrationTester $I) //The artist model was saved correctly but album not $I->assertEquals( - Model::DIRTY_STATE_PERSISTENT, + Enum::DIRTY_STATE_PERSISTENT, $artist->getDirtyState() ); $I->assertEquals( - Model::DIRTY_STATE_TRANSIENT, + Enum::DIRTY_STATE_TRANSIENT, $album->getDirtyState() ); @@ -163,12 +164,12 @@ private function executeSaveRelatedBelongsTo(IntegrationTester $I) //Both messages must be saved correctly $I->assertEquals( - Model::DIRTY_STATE_PERSISTENT, + Enum::DIRTY_STATE_PERSISTENT, $artist->getDirtyState() ); $I->assertEquals( - Model::DIRTY_STATE_PERSISTENT, + Enum::DIRTY_STATE_PERSISTENT, $album->getDirtyState() ); } diff --git a/tests/integration/Mvc/Model/Refactor-SnapshotCest.php b/tests/integration/Mvc/Model/Refactor-SnapshotCest.php index c9a389116bb..13e9e81a82a 100644 --- a/tests/integration/Mvc/Model/Refactor-SnapshotCest.php +++ b/tests/integration/Mvc/Model/Refactor-SnapshotCest.php @@ -612,7 +612,7 @@ public function testDisabledSnapshotUpdate(IntegrationTester $I) $I->skipTest('TODO = Check test'); $robots = Robots::findFirst(); - Model::setup( + AbstractModel::setup( [ 'updateSnapshotOnSave' => false, ] @@ -638,7 +638,7 @@ public function testDisabledSnapshotUpdate(IntegrationTester $I) $robots->hasChanged('name') ); - Model::setup( + AbstractModel::setup( [ 'updateSnapshotOnSave' => true, ] diff --git a/tests/integration/Mvc/Model/SaveCest.php b/tests/integration/Mvc/Model/SaveCest.php index 843ba6347fe..a93de44d0a1 100644 --- a/tests/integration/Mvc/Model/SaveCest.php +++ b/tests/integration/Mvc/Model/SaveCest.php @@ -14,6 +14,7 @@ use IntegrationTester; use Phalcon\Mvc\Model\AbstractModel; +use Phalcon\Mvc\Model\Enum; use Phalcon\Mvc\Model\MetaData; use Phalcon\Test\Fixtures\Traits\DiTrait; use Phalcon\Test\Models\AlbumORama\Albums; @@ -186,17 +187,17 @@ public function mvcModelSaveWithRelatedRecords(IntegrationTester $I) ); $I->assertEquals( - Model::DIRTY_STATE_PERSISTENT, + Enum::DIRTY_STATE_PERSISTENT, $robotPart->getDirtyState() ); $I->assertEquals( - Model::DIRTY_STATE_PERSISTENT, + Enum::DIRTY_STATE_PERSISTENT, $robotPart->robot->getDirtyState() ); $I->assertEquals( - Model::DIRTY_STATE_PERSISTENT, + Enum::DIRTY_STATE_PERSISTENT, $part->getDirtyState() ); diff --git a/tests/integration/Mvc/Model/UnderscoreSetCest.php b/tests/integration/Mvc/Model/UnderscoreSetCest.php index fba4789769d..5775693f638 100644 --- a/tests/integration/Mvc/Model/UnderscoreSetCest.php +++ b/tests/integration/Mvc/Model/UnderscoreSetCest.php @@ -13,6 +13,7 @@ use IntegrationTester; use Phalcon\Mvc\Model\AbstractModel; +use Phalcon\Mvc\Model\Enum; use Phalcon\Test\Fixtures\Traits\DiTrait; use Phalcon\Test\Models; @@ -133,7 +134,7 @@ public function mvcModelUnderscoreSetWithBelongsToRelatedRecord(IntegrationTeste ); $I->assertEquals( - Model::DIRTY_STATE_TRANSIENT, + Enum::DIRTY_STATE_TRANSIENT, $robotPart->getDirtyState() ); } @@ -160,7 +161,7 @@ public function mvcModelUnderscoreSetWithArrayOfBelongsToRelatedRecord(Integrati $I->assertEquals( $robotPart->getDirtyState(), - Model::DIRTY_STATE_TRANSIENT + Enum::DIRTY_STATE_TRANSIENT ); $I->assertEquals( @@ -190,7 +191,7 @@ public function mvcModelUnderscoreSetWithHasOneRelatedRecord(IntegrationTester $ ); $I->assertEquals( - Model::DIRTY_STATE_TRANSIENT, + Enum::DIRTY_STATE_TRANSIENT, $customer->getDirtyState() ); } @@ -216,7 +217,7 @@ public function mvcModelUnderscoreSetWithArrayOfHasOneRelatedRecord(IntegrationT ); $I->assertEquals( - Model::DIRTY_STATE_TRANSIENT, + Enum::DIRTY_STATE_TRANSIENT, $customer->getDirtyState() ); @@ -260,7 +261,7 @@ public function mvcModelUnderscoreSetWithHasManyRelatedRecords(IntegrationTester ); $I->assertEquals( - Model::DIRTY_STATE_TRANSIENT, + Enum::DIRTY_STATE_TRANSIENT, $robot->getDirtyState() ); } @@ -299,7 +300,7 @@ public function mvcModelUnderscoreSetWithHasManyToManyRelatedRecords(Integration ); $I->assertEquals( - Model::DIRTY_STATE_TRANSIENT, + Enum::DIRTY_STATE_TRANSIENT, $robot->getDirtyState() ); }