Fix 'hasExampleData'
This commit is contained in:
parent
929b87e513
commit
7ded60ce9c
21
phpunit.xml
21
phpunit.xml
@ -1,21 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd" bootstrap="vendor/autoload.php"
|
||||
executionOrder="depends,defects" beStrictAboutOutputDuringTests="true" failOnRisky="false" failOnWarning="true"
|
||||
cacheDirectory=".phpunit.cache" requireCoverageMetadata="false" beStrictAboutCoverageMetadata="false" colors="true">
|
||||
<testsuites>
|
||||
<testsuite name="default">
|
||||
<directory>tests</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
<coverage/>
|
||||
<source>
|
||||
<include>
|
||||
<directory suffix=".php">src</directory>
|
||||
</include>
|
||||
</source>
|
||||
<extensions>
|
||||
<bootstrap class="RobinIngelbrecht\PHPUnitPrettyPrint\PhpUnitExtension">
|
||||
</bootstrap>
|
||||
</extensions>
|
||||
</phpunit>
|
@ -103,7 +103,10 @@ abstract class Solution
|
||||
|
||||
public function hasExampleData(): bool
|
||||
{
|
||||
return $this->exampleData['global'] !== [];
|
||||
return
|
||||
($this->exampleData['global'] !== null && $this->exampleData['global'] !== [])
|
||||
|| ($this->exampleData['part1'] !== null && $this->exampleData['part1'] !== [])
|
||||
|| ($this->exampleData['part2'] !== null && $this->exampleData['part2'] !== []);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user