mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 15:57:21 +01:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7796630eaf | |||
| 3aec2b26ef | |||
| 7a7c35292c | |||
| 72cf695554 | |||
| 027f4e4832 |
44
.github/workflows/static.yml
vendored
44
.github/workflows/static.yml
vendored
@ -1,44 +0,0 @@
|
|||||||
name: Static Analysis
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
pull_request:
|
|
||||||
schedule:
|
|
||||||
- cron: '0 0 * * *'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
static:
|
|
||||||
if: github.event_name != 'schedule' || github.repository == 'pestphp/pest'
|
|
||||||
name: Static Tests
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
fail-fast: true
|
|
||||||
matrix:
|
|
||||||
dependency-version: [prefer-lowest, prefer-stable]
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Setup PHP
|
|
||||||
uses: shivammathur/setup-php@v2
|
|
||||||
with:
|
|
||||||
php-version: 8.2
|
|
||||||
tools: composer:v2
|
|
||||||
coverage: none
|
|
||||||
|
|
||||||
- name: Install Dependencies
|
|
||||||
run: composer update --prefer-stable --no-interaction --no-progress --ansi
|
|
||||||
|
|
||||||
# - name: Type Check
|
|
||||||
# run: composer test:type:check
|
|
||||||
|
|
||||||
- name: Type Coverage
|
|
||||||
run: composer test:type:coverage
|
|
||||||
|
|
||||||
- name: Refacto
|
|
||||||
run: composer test:refacto
|
|
||||||
|
|
||||||
- name: Style
|
|
||||||
run: composer test:lint
|
|
||||||
2
.github/workflows/tests.yml
vendored
2
.github/workflows/tests.yml
vendored
@ -15,7 +15,7 @@ jobs:
|
|||||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||||
symfony: ['7.1']
|
symfony: ['7.1']
|
||||||
php: ['8.2', '8.3', '8.4']
|
php: ['8.2', '8.3', '8.4']
|
||||||
dependency_version: [prefer-lowest, prefer-stable]
|
dependency_version: [prefer-stable]
|
||||||
|
|
||||||
name: PHP ${{ matrix.php }} - Symfony ^${{ matrix.symfony }} - ${{ matrix.os }} - ${{ matrix.dependency_version }}
|
name: PHP ${{ matrix.php }} - Symfony ^${{ matrix.symfony }} - ${{ matrix.os }} - ${{ matrix.dependency_version }}
|
||||||
|
|
||||||
|
|||||||
@ -18,17 +18,17 @@
|
|||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^8.2.0",
|
"php": "^8.2.0",
|
||||||
"brianium/paratest": "^7.8.3",
|
"brianium/paratest": "^7.8.5",
|
||||||
"nunomaduro/collision": "^8.8.2",
|
"nunomaduro/collision": "^8.8.3",
|
||||||
"nunomaduro/termwind": "^2.3.1",
|
"nunomaduro/termwind": "^2.3.3",
|
||||||
"pestphp/pest-plugin": "^3.0.0",
|
"pestphp/pest-plugin": "^3.0.0",
|
||||||
"pestphp/pest-plugin-arch": "^3.1.1",
|
"pestphp/pest-plugin-arch": "^3.1.1",
|
||||||
"pestphp/pest-plugin-mutate": "^3.0.5",
|
"pestphp/pest-plugin-mutate": "^3.0.5",
|
||||||
"phpunit/phpunit": "^11.5.33"
|
"phpunit/phpunit": "^11.5.50"
|
||||||
},
|
},
|
||||||
"conflict": {
|
"conflict": {
|
||||||
"filp/whoops": "<2.16.0",
|
"filp/whoops": "<2.16.0",
|
||||||
"phpunit/phpunit": ">11.5.33",
|
"phpunit/phpunit": ">11.5.50",
|
||||||
"sebastian/exporter": "<6.0.0",
|
"sebastian/exporter": "<6.0.0",
|
||||||
"webmozart/assert": "<1.11.0"
|
"webmozart/assert": "<1.11.0"
|
||||||
},
|
},
|
||||||
@ -55,7 +55,7 @@
|
|||||||
"require-dev": {
|
"require-dev": {
|
||||||
"pestphp/pest-dev-tools": "^3.4.0",
|
"pestphp/pest-dev-tools": "^3.4.0",
|
||||||
"pestphp/pest-plugin-type-coverage": "^3.6.1",
|
"pestphp/pest-plugin-type-coverage": "^3.6.1",
|
||||||
"symfony/process": "^7.3.0"
|
"symfony/process": "^7.4.4"
|
||||||
},
|
},
|
||||||
"minimum-stability": "dev",
|
"minimum-stability": "dev",
|
||||||
"prefer-stable": true,
|
"prefer-stable": true,
|
||||||
@ -71,21 +71,12 @@
|
|||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"refacto": "rector",
|
"refacto": "rector",
|
||||||
"lint": "pint",
|
|
||||||
"test:refacto": "rector --dry-run",
|
|
||||||
"test:lint": "pint --test",
|
|
||||||
"test:type:check": "phpstan analyse --ansi --memory-limit=-1 --debug",
|
|
||||||
"test:type:coverage": "php -d memory_limit=-1 bin/pest --type-coverage --min=100",
|
|
||||||
"test:unit": "php bin/pest --colors=always --exclude-group=integration --compact",
|
"test:unit": "php bin/pest --colors=always --exclude-group=integration --compact",
|
||||||
"test:inline": "php bin/pest --colors=always --configuration=phpunit.inline.xml",
|
"test:inline": "php bin/pest --colors=always --configuration=phpunit.inline.xml",
|
||||||
"test:parallel": "php bin/pest --colors=always --exclude-group=integration --parallel --processes=3",
|
"test:parallel": "php bin/pest --colors=always --exclude-group=integration --parallel --processes=3",
|
||||||
"test:integration": "php bin/pest --colors=always --group=integration -v",
|
"test:integration": "php bin/pest --colors=always --group=integration -v",
|
||||||
"update:snapshots": "REBUILD_SNAPSHOTS=true php bin/pest --colors=always --update-snapshots",
|
"update:snapshots": "REBUILD_SNAPSHOTS=true php bin/pest --colors=always --update-snapshots",
|
||||||
"test": [
|
"test": [
|
||||||
"@test:refacto",
|
|
||||||
"@test:lint",
|
|
||||||
"@test:type:check",
|
|
||||||
"@test:type:coverage",
|
|
||||||
"@test:unit",
|
"@test:unit",
|
||||||
"@test:parallel",
|
"@test:parallel",
|
||||||
"@test:integration"
|
"@test:integration"
|
||||||
|
|||||||
@ -232,7 +232,6 @@ final class TeamCityLogger
|
|||||||
$reflector = new ReflectionClass($telemetry);
|
$reflector = new ReflectionClass($telemetry);
|
||||||
|
|
||||||
$property = $reflector->getProperty('current');
|
$property = $reflector->getProperty('current');
|
||||||
$property->setAccessible(true);
|
|
||||||
$snapshot = $property->getValue($telemetry);
|
$snapshot = $property->getValue($telemetry);
|
||||||
assert($snapshot instanceof Snapshot);
|
assert($snapshot instanceof Snapshot);
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@ namespace Pest;
|
|||||||
|
|
||||||
function version(): string
|
function version(): string
|
||||||
{
|
{
|
||||||
return '3.8.3';
|
return '3.8.5';
|
||||||
}
|
}
|
||||||
|
|
||||||
function testDirectory(string $file = ''): string
|
function testDirectory(string $file = ''): string
|
||||||
|
|||||||
@ -23,14 +23,12 @@ final class EnsureIgnorableTestCasesAreIgnored implements StartedSubscriber
|
|||||||
{
|
{
|
||||||
$reflection = new ReflectionClass(Facade::class);
|
$reflection = new ReflectionClass(Facade::class);
|
||||||
$property = $reflection->getProperty('collector');
|
$property = $reflection->getProperty('collector');
|
||||||
$property->setAccessible(true);
|
|
||||||
$collector = $property->getValue();
|
$collector = $property->getValue();
|
||||||
|
|
||||||
assert($collector instanceof Collector);
|
assert($collector instanceof Collector);
|
||||||
|
|
||||||
$reflection = new ReflectionClass($collector);
|
$reflection = new ReflectionClass($collector);
|
||||||
$property = $reflection->getProperty('testRunnerTriggeredWarningEvents');
|
$property = $reflection->getProperty('testRunnerTriggeredWarningEvents');
|
||||||
$property->setAccessible(true);
|
|
||||||
|
|
||||||
/** @var array<int, WarningTriggered> $testRunnerTriggeredWarningEvents */
|
/** @var array<int, WarningTriggered> $testRunnerTriggeredWarningEvents */
|
||||||
$testRunnerTriggeredWarningEvents = $property->getValue($collector);
|
$testRunnerTriggeredWarningEvents = $property->getValue($collector);
|
||||||
|
|||||||
@ -34,8 +34,6 @@ final class Reflection
|
|||||||
try {
|
try {
|
||||||
$reflectionMethod = $reflectionClass->getMethod($method);
|
$reflectionMethod = $reflectionClass->getMethod($method);
|
||||||
|
|
||||||
$reflectionMethod->setAccessible(true);
|
|
||||||
|
|
||||||
return $reflectionMethod->invoke($object, ...$args);
|
return $reflectionMethod->invoke($object, ...$args);
|
||||||
} catch (ReflectionException $exception) {
|
} catch (ReflectionException $exception) {
|
||||||
if (method_exists($object, '__call')) {
|
if (method_exists($object, '__call')) {
|
||||||
@ -113,8 +111,6 @@ final class Reflection
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$reflectionProperty->setAccessible(true);
|
|
||||||
|
|
||||||
return $reflectionProperty->getValue($object);
|
return $reflectionProperty->getValue($object);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -144,8 +140,6 @@ final class Reflection
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$reflectionProperty->setAccessible(true);
|
|
||||||
$reflectionProperty->setValue($object, $value);
|
$reflectionProperty->setValue($object, $value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
Pest Testing Framework 3.8.3.
|
Pest Testing Framework 3.8.5.
|
||||||
|
|
||||||
USAGE: pest <file> [options]
|
USAGE: pest <file> [options]
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,3 @@
|
|||||||
|
|
||||||
Pest Testing Framework 3.8.3.
|
Pest Testing Framework 3.8.5.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user