Skip to content

Commit

Permalink
Update tests and config phpunit.
Browse files Browse the repository at this point in the history
  • Loading branch information
terabytesoftw committed Jan 21, 2024
1 parent b2e6211 commit 665d6bd
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 19 deletions.
38 changes: 19 additions & 19 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.2/phpunit.xsd"
bootstrap="tests/Support/bootstrap.php"
cacheDirectory=".phpunit.cache"
colors="true"
executionOrder="depends,defects"
failOnRisky="true"
failOnWarning="true"
stopOnFailure="false"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.2/phpunit.xsd"
bootstrap="tests/Support/bootstrap.php"
cacheDirectory=".phpunit.cache"
colors="true"
executionOrder="depends,defects"
failOnRisky="true"
failOnWarning="true"
stopOnFailure="false"
>
<testsuites>
<testsuite name="Yii2-Asset-Bootstrap5">
<directory>tests</directory>
</testsuite>
</testsuites>
<testsuites>
<testsuite name="Asset-Bootstrap5">
<directory>tests</directory>
</testsuite>
</testsuites>

<source>
<include>
<directory suffix=".php">./src</directory>
</include>
</source>
<source>
<include>
<directory suffix=".php">./src</directory>
</include>
</source>
</phpunit>
2 changes: 2 additions & 0 deletions tests/BootstrapAssetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace Yii2\Asset\Tests;

use PHPUnit\Framework\Attributes\RequiresPhp;
use Yii;
use Yii2\Asset\BootstrapAsset;
use Yii2\Asset\Tests\Support\TestSupport;
Expand Down Expand Up @@ -38,6 +39,7 @@ public function testRegister(): void
$this->assertFileDoesNotExist(__DIR__ . '/Support/runtime/55145ba9/bootstrap.min.css.map');
}

#[RequiresPhp('8.1')]
public function testRegisterWithEnvironmentProd(): void
{
runkit_constant_redefine('YII_ENV', 'prod');
Expand Down
2 changes: 2 additions & 0 deletions tests/BootstrapPluginAssetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace Yii2\Asset\Tests;

use PHPUnit\Framework\Attributes\RequiresPhp;
use Yii;
use Yii2\Asset\BootstrapAsset;
use Yii2\Asset\BootstrapPluginAsset;
Expand Down Expand Up @@ -40,6 +41,7 @@ public function testRegister(): void
$this->assertFileDoesNotExist(__DIR__ . '/Support/runtime/16b8de20/bootstrap.bundle.min.js.map');
}

#[RequiresPhp('8.1')]
public function testRegisterWithEnvironmentProd(): void
{
@runkit_constant_redefine('YII_ENV', 'prod');
Expand Down

0 comments on commit 665d6bd

Please sign in to comment.