Skip to content

Commit

Permalink
[php-slim4] Migrate PHPUnit config (#10230)
Browse files Browse the repository at this point in the history
* Migrate PHPUnit9 config file template

* Refresh samples
  • Loading branch information
ybelenko committed Oct 17, 2021
1 parent 9f92322 commit 357f186
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 60 deletions.
Original file line number Diff line number Diff line change
@@ -1,32 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/4.8/phpunit.xsd"
bootstrap="./vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
beStrictAboutTestsThatDoNotTestAnything="false"
stopOnFailure="false"
>
<testsuites>
<testsuite name="Apis">
<directory>{{apiTestPath}}</directory>
</testsuite>
<testsuite name="Models">
<file>./{{testBasePath}}/BaseModelTest.php</file>
<directory>{{modelTestPath}}</directory>
</testsuite>
</testsuites>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">{{apiSrcPath}}</directory>
<file>./{{srcBasePath}}/BaseModel.php</file>
<directory suffix=".php">{{modelSrcPath}}</directory>
</whitelist>
</filter>
<php>
<ini name="error_reporting" value="E_ALL" />
</php>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd" bootstrap="./vendor/autoload.php" colors="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" beStrictAboutTestsThatDoNotTestAnything="false" stopOnFailure="false">
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">{{apiSrcPath}}</directory>
<file>./{{srcBasePath}}/BaseModel.php</file>
<directory suffix=".php">{{modelSrcPath}}</directory>
</include>
</coverage>
<testsuites>
<testsuite name="Apis">
<directory>{{apiTestPath}}</directory>
</testsuite>
<testsuite name="Models">
<file>./{{testBasePath}}/BaseModelTest.php</file>
<directory>{{modelTestPath}}</directory>
</testsuite>
</testsuites>
<php>
<ini name="error_reporting" value="E_ALL"/>
</php>
</phpunit>
50 changes: 20 additions & 30 deletions samples/server/petstore/php-slim4/phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,32 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/4.8/phpunit.xsd"
bootstrap="./vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
beStrictAboutTestsThatDoNotTestAnything="false"
stopOnFailure="false"
>
<testsuites>
<testsuite name="Apis">
<directory>./tests/Api</directory>
</testsuite>
<testsuite name="Models">
<file>./tests/BaseModelTest.php</file>
<directory>./tests/Model</directory>
</testsuite>
</testsuites>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./lib/Api</directory>
<file>./lib/BaseModel.php</file>
<directory suffix=".php">./lib/Model</directory>
</whitelist>
</filter>
<php>
<ini name="error_reporting" value="E_ALL" />
</php>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd" bootstrap="./vendor/autoload.php" colors="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" beStrictAboutTestsThatDoNotTestAnything="false" stopOnFailure="false">
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">./lib/Api</directory>
<file>./lib/BaseModel.php</file>
<directory suffix=".php">./lib/Model</directory>
</include>
</coverage>
<testsuites>
<testsuite name="Apis">
<directory>./tests/Api</directory>
</testsuite>
<testsuite name="Models">
<file>./tests/BaseModelTest.php</file>
<directory>./tests/Model</directory>
</testsuite>
</testsuites>
<php>
<ini name="error_reporting" value="E_ALL"/>
</php>
</phpunit>

0 comments on commit 357f186

Please sign in to comment.