Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix class not found in plugin test #823

Merged
merged 3 commits into from Apr 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion templates/bake/Plugin/phpunit.xml.dist.twig
Expand Up @@ -34,7 +34,7 @@

<!-- Setup fixture extension -->
<extensions>
<extension class="Cake\TestSuite\Fixtures\PHPUnitExtension" />
<extension class="Cake\TestSuite\Fixture\PHPUnitExtension" />
</extensions>

<filter>
Expand Down
6 changes: 3 additions & 3 deletions templates/bake/Plugin/tests/bootstrap.php.twig
Expand Up @@ -34,7 +34,7 @@ $findRoot = function ($root) {
}
} while ($root !== $lastRoot);

throw new Exception("Cannot find the root of the application, unable to run tests");
throw new Exception('Cannot find the root of the application, unable to run tests');
};
$root = $findRoot(__FILE__);
unset($findRoot);
Expand Down Expand Up @@ -66,7 +66,7 @@ if (file_exists($root . '/config/bootstrap.php')) {
* using migrations to provide schema for your plugin,
* and using \Migrations\TestSuite\Migrator to load schema.
*/
use Cake\TestSuite\Schema\SchemaManager;
use Cake\TestSuite\Fixture\SchemaLoader;

// Load a schema dump file.
SchemaManager::create('test', 'tests/schema.sql');
(new SchemaLoader())->loadSqlFiles('tests/schema.sql', 'test');
2 changes: 1 addition & 1 deletion tests/comparisons/Plugin/Company/Example/phpunit.xml.dist
Expand Up @@ -19,7 +19,7 @@

<!-- Setup fixture extension -->
<extensions>
<extension class="Cake\TestSuite\Fixtures\PHPUnitExtension" />
<extension class="Cake\TestSuite\Fixture\PHPUnitExtension" />
</extensions>

<filter>
Expand Down
6 changes: 3 additions & 3 deletions tests/comparisons/Plugin/Company/Example/tests/bootstrap.php
Expand Up @@ -17,7 +17,7 @@
}
} while ($root !== $lastRoot);

throw new Exception("Cannot find the root of the application, unable to run tests");
throw new Exception('Cannot find the root of the application, unable to run tests');
};
$root = $findRoot(__FILE__);
unset($findRoot);
Expand Down Expand Up @@ -49,7 +49,7 @@
* using migrations to provide schema for your plugin,
* and using \Migrations\TestSuite\Migrator to load schema.
*/
use Cake\TestSuite\Schema\SchemaManager;
use Cake\TestSuite\Fixture\SchemaLoader;

// Load a schema dump file.
SchemaManager::create('test', 'tests/schema.sql');
(new SchemaLoader())->loadSqlFiles('tests/schema.sql', 'test');
2 changes: 1 addition & 1 deletion tests/comparisons/Plugin/SimpleExample/phpunit.xml.dist
Expand Up @@ -19,7 +19,7 @@

<!-- Setup fixture extension -->
<extensions>
<extension class="Cake\TestSuite\Fixtures\PHPUnitExtension" />
<extension class="Cake\TestSuite\Fixture\PHPUnitExtension" />
</extensions>

<filter>
Expand Down
6 changes: 3 additions & 3 deletions tests/comparisons/Plugin/SimpleExample/tests/bootstrap.php
Expand Up @@ -17,7 +17,7 @@
}
} while ($root !== $lastRoot);

throw new Exception("Cannot find the root of the application, unable to run tests");
throw new Exception('Cannot find the root of the application, unable to run tests');
};
$root = $findRoot(__FILE__);
unset($findRoot);
Expand Down Expand Up @@ -49,7 +49,7 @@
* using migrations to provide schema for your plugin,
* and using \Migrations\TestSuite\Migrator to load schema.
*/
use Cake\TestSuite\Schema\SchemaManager;
use Cake\TestSuite\Fixture\SchemaLoader;

// Load a schema dump file.
SchemaManager::create('test', 'tests/schema.sql');
(new SchemaLoader())->loadSqlFiles('tests/schema.sql', 'test');