Skip to content

Commit

Permalink
Tweak testing config
Browse files Browse the repository at this point in the history
  • Loading branch information
bennothommo committed Jul 18, 2022
1 parent 5cda479 commit 4398be4
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,17 @@ jobs:
matrix:
phpVersion: ['8.0', '8.1']
winterRelease: ['develop']
winterReleaseDir: ['develop']
include:
- phpVersion: '7.2'
winterRelease: 'v1.1.9'
winterReleaseDir: '1.1.9'
- phpVersion: '7.3'
winterRelease: 'v1.1.9'
winterReleaseDir: '1.1.9'
- phpVersion: '7.4'
winterRelease: 'v1.1.9'
winterReleaseDir: '1.1.9'
fail-fast: false
env:
phpExtensions: mbstring, intl, gd, xml, sqlite
Expand Down Expand Up @@ -59,11 +63,11 @@ jobs:
- name: Install Winter CMS
run: |
wget https://github.com/wintercms/winter/archive/${{ matrix.winterRelease }}.zip
unzip ${{ matrix.winterRelease }}.zip
rm ${{ matrix.winterRelease }}.zip
unzip ${{ matrix.winterReleaseDir }}.zip
rm ${{ matrix.winterReleaseDir }}.zip
shopt -s dotglob
mv winter-${{ matrix.winterRelease }}/* ./
rmdir winter-${{ matrix.winterRelease }}
mv winter-${{ matrix.winterReleaseDir }}/* ./
rmdir winter-${{ matrix.winterReleaseDir }}
shopt -u dotglob
cp config/cms.php config/testing/cms.php
mkdir -p plugins/winter
Expand Down
13 changes: 11 additions & 2 deletions tests/UserPluginTestCase.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
<?php namespace Winter\User\Tests;

use App;
use PluginTestCase;
use Illuminate\Foundation\AliasLoader;
use Winter\User\Models\Settings;

abstract class UserPluginTestCase extends PluginTestCase
if (class_exists('System\Tests\Bootstrap\PluginTestCase')) {
class BaseTestCase extends \System\Tests\Bootstrap\PluginTestCase
{
}
} else {
class BaseTestCase extends \PluginTestCase
{
}
}

abstract class UserPluginTestCase extends BaseTestCase
{
/**
* @var array Plugins to refresh between tests.
Expand Down

0 comments on commit 4398be4

Please sign in to comment.