Skip to content

Commit ca06bfd

Browse files
committed
update plugin to 4.4. fix warnings
1 parent 14ac610 commit ca06bfd

File tree

3 files changed

+60
-28
lines changed

3 files changed

+60
-28
lines changed

composer.json

+5
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,10 @@
5555
"rector": "rector process",
5656
"rector-setup": "cp composer.json composer.backup && composer require --dev rector/rector:^0.11.2 && mv composer.backup composer.json",
5757
"coverage-test": "phpunit --stderr --coverage-clover=clover.xml"
58+
},
59+
"config": {
60+
"allow-plugins": {
61+
"dealerdirect/phpcodesniffer-composer-installer": true
62+
}
5863
}
5964
}

phpunit.xml.dist

+17-28
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,19 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit
3-
bootstrap="./tests/bootstrap.php"
4-
colors="true"
5-
stopOnFailure="false"
6-
>
7-
8-
<testsuites>
9-
<testsuite name="Enum Test Cases">
10-
<directory>./tests/</directory>
11-
</testsuite>
12-
</testsuites>
13-
14-
<!-- Setup a listener for fixtures -->
15-
<listeners>
16-
<listener
17-
class="\Cake\TestSuite\Fixture\FixtureInjector"
18-
file="./vendor/cakephp/cakephp/src/TestSuite/Fixture/FixtureInjector.php">
19-
<arguments>
20-
<object class="\Cake\TestSuite\Fixture\FixtureManager" />
21-
</arguments>
22-
</listener>
23-
</listeners>
24-
25-
<filter>
26-
<whitelist>
27-
<directory suffix=".php">./src/</directory>
28-
</whitelist>
29-
</filter>
2+
<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/9.3/phpunit.xsd">
3+
<php>
4+
<ini name="memory_limit" value="-1"/>
5+
<ini name="apc.enable_cli" value="1"/>
6+
<env name="FIXTURE_SCHEMA_METADATA" value="./tests/schema.php"/>
7+
</php>
8+
<!-- Add any additional test suites you want to run here -->
9+
<testsuites>
10+
<testsuite name="Enum Test Cases">
11+
<directory>./tests/TestCase</directory>
12+
</testsuite>
13+
</testsuites>
14+
<!-- Setup a listener for fixtures -->
15+
<extensions>
16+
<extension class="\Cake\TestSuite\Fixture\PHPUnitExtension"/>
17+
</extensions>
18+
<!-- Prevent coverage reports from looking in tests and vendors -->
3019
</phpunit>

tests/schema.php

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?php
2+
declare(strict_types=1);
3+
4+
/**
5+
* Abstract schema for CakePHP tests.
6+
*
7+
* This format resembles the existing fixture schema
8+
* and is converted to SQL via the Schema generation
9+
* features of the Database package.
10+
*/
11+
return [
12+
[
13+
'table' => 'enum_articles',
14+
'columns' => [
15+
'id' => ['type' => 'integer'],
16+
'title' => ['type' => 'string'],
17+
'body' => ['type' => 'text'],
18+
'priority' => ['type' => 'string'],
19+
'status' => ['type' => 'string'],
20+
'article_category' => ['type' => 'integer'],
21+
],
22+
'constraints' => [
23+
'primary' => ['type' => 'primary', 'columns' => ['id'], 'length' => []],
24+
],
25+
],
26+
[
27+
'table' => 'enum_lookups',
28+
'columns' => [
29+
'id' => ['type' => 'integer'],
30+
'label' => ['type' => 'string'],
31+
'prefix' => ['type' => 'string'],
32+
'name' => ['type' => 'string'],
33+
],
34+
'constraints' => [
35+
'primary' => ['type' => 'primary', 'columns' => ['id'], 'length' => []],
36+
],
37+
],
38+
];

0 commit comments

Comments
 (0)