Skip to content

Commit

Permalink
Updates for phpunit 10
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Jul 17, 2023
1 parent 44ed173 commit 44e0c53
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
php-version: '8.1'
extensions: mbstring, intl
coverage: none
tools: vimeo/psalm:5, phpstan:1.9, cs2pr
tools: vimeo/psalm:5, phpstan:1.10, cs2pr

- name: Composer Install
run: composer require --dev cakephp/cakephp-codesniffer:^5.0
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ vendor/
composer.lock
tmp
.phpunit.result.cache
.phpunit.cache
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"require-dev": {
"friendsofcake/cakephp-test-utilities": "dev-cake-5.x",
"markstory/asset_compress": "5.x-dev",
"phpunit/phpunit": "^9.5.19"
"phpunit/phpunit": "^10.1"
},
"autoload": {
"psr-4": {
Expand Down
22 changes: 7 additions & 15 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,27 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
colors="true"
processIsolation="false"
stopOnFailure="false"
bootstrap="./tests/bootstrap.php"
>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" colors="true" processIsolation="false" stopOnFailure="false" bootstrap="./tests/bootstrap.php" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.2/phpunit.xsd" cacheDirectory=".phpunit.cache">
<testsuites>
<testsuite name="CrudView Tests">
<directory>./tests/TestCase</directory>
</testsuite>
</testsuites>

<extensions>
<extension class="Cake\TestSuite\Fixture\PHPUnitExtension"/>
<bootstrap class="Cake\TestSuite\Fixture\Extension\PHPUnitExtension"/>
</extensions>

<coverage>
<include>
<directory suffix=".php">src/</directory>
</include>
</coverage>

<php>
<!-- <env name="FIXTURE_SCHEMA_METADATA" value="./tests/schema.php"/> -->
</php>
<source>
<include>
<directory suffix=".php">src/</directory>
</include>
</source>
</phpunit>
1 change: 1 addition & 0 deletions src/Action/DashboardAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use Crud\Action\BaseAction;
use Crud\Traits\ViewTrait;
use CrudView\Dashboard\Dashboard;
use function Cake\I18n\__d;

class DashboardAction extends BaseAction
{
Expand Down
1 change: 1 addition & 0 deletions src/Dashboard/Dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use Cake\Datasource\EntityTrait;
use Cake\View\Cell;
use InvalidArgumentException;
use function Cake\I18n\__d;

class Dashboard
{
Expand Down
1 change: 1 addition & 0 deletions src/Listener/Traits/FormTypeTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use Cake\Controller\Controller;
use Crud\Action\BaseAction;
use Crud\Action\EditAction;
use function Cake\I18n\__d;

trait FormTypeTrait
{
Expand Down
1 change: 1 addition & 0 deletions src/Listener/ViewListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use CrudView\Listener\Traits\SiteTitleTrait;
use CrudView\Listener\Traits\UtilityNavigationTrait;
use CrudView\Traits\CrudViewConfigTrait;
use function Cake\I18n\__d;

class ViewListener extends BaseListener
{
Expand Down
1 change: 1 addition & 0 deletions src/View/Helper/CrudViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use Cake\Utility\Text;
use Cake\View\Helper;
use Cake\View\Helper\FormHelper;
use function Cake\I18n\__d;

/**
* @property \BootstrapUI\View\Helper\FormHelper $Form
Expand Down
1 change: 1 addition & 0 deletions tests/TestCase/Dashboard/DashboardTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use CrudView\Dashboard\Dashboard;
use CrudView\View\Cell\DashboardTableCell;
use InvalidArgumentException;
use function Cake\I18n\__d;

/**
* DashboardTest class
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/View/Widget/DateTimeWidgetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function testRenderSimple($compareFileName, $data)
*
* @return array
*/
public function renderProvider()
public static function renderProvider()
{
return [
[
Expand Down

0 comments on commit 44e0c53

Please sign in to comment.