Skip to content

Commit

Permalink
Update phpunit
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaasuni committed Dec 24, 2024
1 parent 51dcdf1 commit e47c4c1
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 18 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ tag:
.PHONY: test
test:
cp phpunit.xml.dist phpunit.xml
./vendor/bin/phpunit --migrate-configuration || true
#./vendor/bin/phpunit --migrate-configuration || true
XDEBUG_MODE=coverage ./vendor/bin/phpunit --stderr test

# Remove all installed files
Expand Down
32 changes: 18 additions & 14 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,27 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
displayDetailsOnTestsThatTriggerDeprecations="true"
displayDetailsOnTestsThatTriggerErrors="true"
displayDetailsOnTestsThatTriggerNotices="true"
displayDetailsOnTestsThatTriggerWarnings="true"
displayDetailsOnPhpunitDeprecations="true"
processIsolation="false"
stopOnFailure="false"
verbose="true">
stopOnFailure="false">
<testsuites>
<testsuite name="tc-lib-color Test Suite">
<directory>./test</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix="php">src</directory>
</whitelist>
</filter>
<source>
<include>
<directory suffix=".php">src</directory>
</include>
</source>
<coverage>
<report>
<clover outputFile="target/coverage/coverage.xml"/>
<html outputDirectory="target/coverage" lowUpperBound="50" highLowerBound="90"/>
</report>
</coverage>
<logging>
<log type="coverage-html" target="target/coverage"/>
<log type="coverage-clover" target="target/coverage/coverage.xml"/>
<log type="junit" target="target/logs/junit.xml"/>
<junit outputFile="target/logs/junit.xml"/>
</logging>
</phpunit>
7 changes: 4 additions & 3 deletions test/WebTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

namespace Test;

use PHPUnit\Framework\Attributes\DataProvider;

/**
* Web Color class test
*
Expand Down Expand Up @@ -214,9 +216,8 @@ public static function getBadColor(): array
return [['g(-)'], ['rgb(-)'], ['hsl(-)'], ['cmyk(-)']];
}

/**
* @dataProvider getBadColor
*/

#[DataProvider('getBadColor')]
public function testGetColorObjBad(string $bad): void
{
$this->bcExpectException('\\' . \Com\Tecnick\Color\Exception::class);
Expand Down

0 comments on commit e47c4c1

Please sign in to comment.