diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 02c5394..121f718 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -13,5 +13,3 @@ jobs: coverage: name: "Nette Tester" uses: contributte/.github/.github/workflows/nette-tester-coverage.yml@v1 - with: - php: "8.1" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 809a3e1..b37ff92 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -10,6 +10,12 @@ on: - cron: "0 8 * * 1" jobs: + test82: + name: "Nette Tester" + uses: contributte/.github/.github/workflows/nette-tester.yml@v1 + with: + php: "8.2" + test81: name: "Nette Tester" uses: contributte/.github/.github/workflows/nette-tester.yml@v1 diff --git a/composer.json b/composer.json index 4966112..d2d9e07 100644 --- a/composer.json +++ b/composer.json @@ -21,22 +21,23 @@ "require": { "php": ">= 8.0", "codeception/codeception": "^5.0.0", - "codeception/lib-innerbrowser": "^3.0", - "nette/di": "^3.0.13", - "nette/bootstrap": "^3.1.2", - "nette/http": "^3.1.6", - "nette/utils": "^3.2.8" + "codeception/lib-innerbrowser": "^3.1.3 || ^4.0.0", + "nette/di": "^3.1.1", + "nette/bootstrap": "^3.2.0", + "nette/http": "^3.2.1", + "nette/utils": "^3.2.8 || ^4.0" }, "require-dev": { "latte/latte": "^2.11.5", "nette/application": "^3.1.7", "nette/caching": "^3.1.4", - "ninjify/qa": "^0.12", + "ninjify/qa": "^0.14", "phpstan/phpstan": "^1.8.11", "phpstan/phpstan-deprecation-rules": "^1.0", "phpstan/phpstan-nette": "^1.1.0", "phpstan/phpstan-strict-rules": "^1.4.4", - "tracy/tracy": "^2.7.9" + "tracy/tracy": "^2.9.0", + "phpunit/php-code-coverage": "^9.2.24" }, "autoload": { "psr-4": { diff --git a/src/Http/Response.php b/src/Http/Response.php index d12bd29..b2b7392 100644 --- a/src/Http/Response.php +++ b/src/Http/Response.php @@ -66,7 +66,7 @@ public function setContentType(string $type, ?string $charset = null) return $this; } - public function redirect(string $url, int $code = self::S302_FOUND): void + public function redirect(string $url, int $code = self::S302_Found): void { $this->setCode($code); $this->setHeader('Location', $url); diff --git a/src/Module/NetteDIModule.php b/src/Module/NetteDIModule.php index e81a2cf..33d7b97 100644 --- a/src/Module/NetteDIModule.php +++ b/src/Module/NetteDIModule.php @@ -4,9 +4,9 @@ use Codeception\Module; use Codeception\TestInterface; +use Nette\Bootstrap\Configurator; use Nette\Caching\Storages\Journal; use Nette\Caching\Storages\SQLiteJournal; -use Nette\Configurator; use Nette\DI\Container; use Nette\DI\Extensions\ExtensionsExtension; use Nette\DI\MissingServiceException; @@ -34,7 +34,7 @@ class NetteDIModule extends Module 'newContainerForEachTest' => false, ]; - /** @var string[] */ + /** @var string[] */ protected array $requiredFields = [ 'tempDir', ]; @@ -132,10 +132,10 @@ private function createContainer(): void if ($this->config['logDir'] !== null) { $logDir = $this->path . '/' . $this->config['logDir']; FileSystem::createDir($logDir); - $configurator->enableDebugger($logDir); + $configurator->enableTracy($logDir); } - $configurator->addParameters([ + $configurator->addStaticParameters([ 'appDir' => $this->path . ($this->config['appDir'] !== null ? '/' . $this->config['appDir'] : ''), 'wwwDir' => $this->path . ($this->config['wwwDir'] !== null ? '/' . $this->config['wwwDir'] : ''), ]); diff --git a/tests/.coveralls.yml b/tests/.coveralls.yml new file mode 100644 index 0000000..76845b0 --- /dev/null +++ b/tests/.coveralls.yml @@ -0,0 +1,4 @@ +# for php-coveralls +service_name: github-actions +coverage_clover: tests/_output/coverage.xml +json_path: coverage.json