Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: mbstring, intl, pdo_sqlite, pdo_mysql
extensions: mbstring, intl, pdo_sqlite
coverage: none

- name: Composer install
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"license": "MIT",
"require": {
"php": ">=7.2",
"cakephp/cakephp": "~4.2.0",
"cakephp/cakephp": "dev-4.next as 4.3.0",
"cakephp/migrations": "^3.0",
"cakephp/plugin-installer": "^1.3",
"mobiledetect/mobiledetectlib": "^2.8"
Expand Down
12 changes: 4 additions & 8 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,10 @@
<!-- Add plugin test suites here. -->
</testsuites>

<!-- Setup a listener for fixtures -->
<listeners>
<listener class="Cake\TestSuite\Fixture\FixtureInjector">
<arguments>
<object class="Cake\TestSuite\Fixture\FixtureManager"/>
</arguments>
</listener>
</listeners>
<!-- Load extension for fixtures -->
<extensions>
<extension class="Cake\TestSuite\FixtureSchemaExtension" />
</extensions>

<!-- Ignore vendor tests in code coverage reports -->
<filter>
Expand Down
13 changes: 13 additions & 0 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,16 @@
// does not allow the sessionid to be set after stdout
// has been written to.
session_id('cli');

// Load schema from a SQL dump file.
//
// If your plugin does not use database fixtures you can
// safely delete this.
//
// If you want to support multiple databases, consider
// using migrations to provide schema for your plugin,
// and using \Migrations\TestSuite\Migrator to load schema.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to have a code e.g. for this too.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to add it later this week. That will be the 'default' mode for applications as I think re-using migrations is a better dev experience than having to generate a dump file. I was blocked on the migrations changes not being merged.

//
// Uncomment these lines to load test database schema from a file.
// use Cake\TestSuite\Schema\SchemaManager;
//SchemaManager::create('test', './tests/schema.sql');
4 changes: 4 additions & 0 deletions tests/schema.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-- Test database schema.
--
-- If you are not using CakePHP migrations you can put
-- your application's schema in this file and use it in tests.