You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class ProductTest extends \Magento\TestFramework\TestCase\AbstractController
{
public static function loadFixture()
{
include __DIR__ . '/../_files/categories.php';
}
/**
* @magentoDbIsolation enabled
* @magentoAppIsolation enabled
* @magentoDataFixture loadFixture
*/
public function testCategory()
{
$this->dispatch('catalog/category/view/id/3');
$this->assertContains('Category 1', $this->getResponse()->getBody());
}
}
Then when I run the integration test with the plugin, the call to $this->dispatch() leads to this error:
Magento\Framework\Exception\LocalizedException: The configuration file has changed. Run the "app:config:import" or the "setup:upgrade" command to synchronize the configuration.
magento/vendor/magento/module-deploy/Model/Plugin/ConfigChangeDetector.php:50
magento/vendor/magento/framework/Interception/Interceptor.php:121
magento/vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php:69
magento/vendor/magento/framework/Interception/Interceptor.php:135
magento/vendor/magento/framework/Interception/Interceptor.php:153
magento/generated/code/Magento/Framework/App/FrontController/Interceptor.php:26
magento/vendor/magento/framework/App/Http.php:137
magento/generated/code/Magento/Framework/App/Http/Interceptor.php:24
magento/dev/tests/integration/framework/Magento/TestFramework/Application.php:449
magento/dev/tests/integration/framework/Magento/TestFramework/Helper/Bootstrap.php:117
magento/dev/tests/integration/framework/Magento/TestFramework/TestCase/AbstractController.php:116
magento/app/code/XYX/Module/Test/Integration/Controller/ProductTest.php:58
Maybe this is related to using/extending AbstractController?
EDIT:
So when I run a test that uses extend \PHPUnit\Framework\TestCase it works.
Does anyone know what I can do to be able to use Controller Test cases?
The text was updated successfully, but these errors were encountered:
elburro1887
changed the title
LocalizedException: The configuration file has changed
LocalizedException: The configuration file has changed when using TestCase\AbstractController
Jun 3, 2021
Could you test for the regular Integration Tests setup (so, of the Magento core) to see if the problem occurs there as well? Perhaps the issue you are having is not related to the Reach Digital Test Framework (which would justify posting here) but related to the specific modules you have installed in the instance where you run the tests.
My test looks like this:
Then when I run the integration test with the plugin, the call to $this->dispatch() leads to this error:
Maybe this is related to using/extending AbstractController?
EDIT:
So when I run a test that uses
extend \PHPUnit\Framework\TestCase
it works.Does anyone know what I can do to be able to use Controller Test cases?
The text was updated successfully, but these errors were encountered: