mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 15:57:21 +01:00
Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 809fb855de | |||
| aa14f2e200 | |||
| e319bdb6d3 | |||
| fb7340b556 | |||
| 0528fec083 | |||
| 1cbaaf6e12 | |||
| dc862f60b2 | |||
| ff04d54247 | |||
| 330cf05177 | |||
| 42b5fa914c | |||
| 3b1026b7d7 | |||
| b6151e0d01 | |||
| d6db2c13c1 | |||
| 07b6ff6c04 | |||
| ac5da9e3f7 |
42
.github/workflows/integration-tests.yml
vendored
42
.github/workflows/integration-tests.yml
vendored
@ -1,42 +0,0 @@
|
||||
name: Integration Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
if: github.event_name != 'schedule' || github.repository == 'pestphp/pest'
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
php: ['8.1', '8.2']
|
||||
dependency-version: [prefer-lowest, prefer-stable]
|
||||
|
||||
name: PHP ${{ matrix.php }} - ${{ matrix.os }} - ${{ matrix.dependency-version }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php }}
|
||||
tools: composer:v2
|
||||
coverage: none
|
||||
|
||||
- name: Setup Problem Matches
|
||||
run: |
|
||||
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
|
||||
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
|
||||
|
||||
- name: Install PHP dependencies
|
||||
run: composer update --${{ matrix.dependency-version }} --no-interaction --no-progress --ansi
|
||||
|
||||
- name: Integration Tests
|
||||
run: composer test:integration
|
||||
|
||||
1
.github/workflows/static.yml
vendored
1
.github/workflows/static.yml
vendored
@ -13,6 +13,7 @@ jobs:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
dependency-version: [prefer-lowest, prefer-stable]
|
||||
|
||||
|
||||
19
.github/workflows/tests.yml
vendored
19
.github/workflows/tests.yml
vendored
@ -6,18 +6,23 @@ on:
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
tests:
|
||||
if: github.event_name != 'schedule' || github.repository == 'pestphp/pest'
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
symfony: ['6.4.0', '7.0.1']
|
||||
php: ['8.1', '8.2', '8.3']
|
||||
dependency-version: [prefer-lowest, prefer-stable]
|
||||
dependency_version: [prefer-lowest, prefer-stable]
|
||||
exclude:
|
||||
- php: '8.1'
|
||||
symfony: '7.0.1'
|
||||
|
||||
name: PHP ${{ matrix.php }} - ${{ matrix.os }} - ${{ matrix.dependency-version }}
|
||||
name: PHP ${{ matrix.php }} - Symfony ^${{ matrix.symfony }} - ${{ matrix.os }} - ${{ matrix.dependency_version }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
@ -36,11 +41,13 @@ jobs:
|
||||
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
|
||||
|
||||
- name: Install PHP dependencies
|
||||
run: composer update --${{ matrix.dependency-version }} --no-interaction --no-progress --ansi
|
||||
run: composer update --${{ matrix.dependency_version }} --no-interaction --no-progress --ansi --with="symfony/console:^${{ matrix.symfony }}"
|
||||
|
||||
- name: Unit Tests
|
||||
run: composer test:unit
|
||||
|
||||
- name: Unit Tests in Parallel
|
||||
- name: Parallel Tests
|
||||
run: composer test:parallel
|
||||
|
||||
- name: Integration Tests
|
||||
run: composer test:integration
|
||||
|
||||
2
bin/pest
2
bin/pest
@ -38,7 +38,7 @@ use Symfony\Component\Console\Output\ConsoleOutput;
|
||||
unset($args[$key]);
|
||||
}
|
||||
|
||||
if ($value === '--todos') {
|
||||
if (in_array($value, ['--todo', '--todos'], true)) {
|
||||
$todo = true;
|
||||
unset($args[$key]);
|
||||
}
|
||||
|
||||
@ -23,10 +23,10 @@
|
||||
"nunomaduro/termwind": "^1.15.1|^2.0.0",
|
||||
"pestphp/pest-plugin": "^2.1.1",
|
||||
"pestphp/pest-plugin-arch": "^2.4.1",
|
||||
"phpunit/phpunit": "^10.4.2"
|
||||
"phpunit/phpunit": "^10.5.1"
|
||||
},
|
||||
"conflict": {
|
||||
"phpunit/phpunit": ">10.4.2",
|
||||
"phpunit/phpunit": ">10.5.1",
|
||||
"sebastian/exporter": "<5.1.0",
|
||||
"webmozart/assert": "<1.11.0"
|
||||
},
|
||||
@ -53,7 +53,7 @@
|
||||
"require-dev": {
|
||||
"pestphp/pest-dev-tools": "^2.16.0",
|
||||
"pestphp/pest-plugin-type-coverage": "^2.5.0",
|
||||
"symfony/process": "^6.3.4"
|
||||
"symfony/process": "^6.4.0|^7.0.1"
|
||||
},
|
||||
"minimum-stability": "dev",
|
||||
"prefer-stable": true,
|
||||
|
||||
@ -6,7 +6,7 @@ namespace Pest;
|
||||
|
||||
function version(): string
|
||||
{
|
||||
return '2.26.0';
|
||||
return '2.27.0';
|
||||
}
|
||||
|
||||
function testDirectory(string $file = ''): string
|
||||
|
||||
@ -34,7 +34,7 @@ final class Parallel implements HandlesArguments
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
private const UNSUPPORTED_ARGUMENTS = ['--todos', '--retry'];
|
||||
private const UNSUPPORTED_ARGUMENTS = ['--todo', '--todos', '--retry'];
|
||||
|
||||
/**
|
||||
* Whether the given command line arguments indicate that the test suite should be run in parallel.
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
|
||||
Pest Testing Framework 2.26.0.
|
||||
Pest Testing Framework 2.27.0.
|
||||
|
||||
USAGE: pest <file> [options]
|
||||
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
|
||||
Pest Testing Framework 2.26.0.
|
||||
Pest Testing Framework 2.27.0.
|
||||
|
||||
|
||||
@ -1348,10 +1348,12 @@
|
||||
- visual snapshot of team city with ('SuccessOnly.php')
|
||||
|
||||
PASS Tests\Visual\Todo
|
||||
✓ todos
|
||||
✓ todos in parallel
|
||||
✓ todo
|
||||
✓ todo in parallel
|
||||
|
||||
WARN Tests\Visual\Version
|
||||
- visual snapshot of help command output
|
||||
|
||||
Tests: 2 deprecated, 4 warnings, 5 incomplete, 2 notices, 13 todos, 19 skipped, 964 passed (2282 assertions)
|
||||
Tests: 2 deprecated, 4 warnings, 5 incomplete, 2 notices, 13 todos, 19 skipped, 966 passed (2286 assertions)
|
||||
31
tests/.snapshots/todos.txt
Normal file
31
tests/.snapshots/todos.txt
Normal file
@ -0,0 +1,31 @@
|
||||
TODO Tests\Features\BeforeEachProxiesToTestCallWithTodo - 4 todos
|
||||
↓ is marked as todo 1
|
||||
↓ is marked as todo 2
|
||||
↓ is marked as todo 3
|
||||
↓ shouldBeMarkedAsTodo
|
||||
|
||||
TODO Tests\Features\DatasetsTests - 1 todo
|
||||
↓ forbids to define tests in Datasets dirs and Datasets.php files
|
||||
|
||||
TODO Tests\Features\Describe - 5 todos
|
||||
↓ todo
|
||||
↓ todo on hook → should not fail
|
||||
↓ todo on hook → should run
|
||||
↓ todo on describe → should not fail
|
||||
↓ todo on describe → should run
|
||||
|
||||
TODO Tests\Features\Todo - 3 todos
|
||||
↓ something todo later
|
||||
↓ something todo later chained
|
||||
↓ something todo later chained and with function body
|
||||
|
||||
PASS Tests\CustomTestCase\ChildTest
|
||||
✓ override method
|
||||
|
||||
PASS Tests\CustomTestCase\ExecutedTest
|
||||
✓ that gets executed
|
||||
|
||||
PASS Tests\CustomTestCase\ParentTest
|
||||
✓ override method
|
||||
|
||||
Tests: 13 todos, 3 passed (3 assertions)
|
||||
@ -26,10 +26,18 @@ $snapshot = function ($name) {
|
||||
]));
|
||||
};
|
||||
|
||||
test('todos', function () use ($run, $snapshot) {
|
||||
expect($run('--todos', false))->toContain($snapshot('todos'));
|
||||
})->skipOnWindows();
|
||||
|
||||
test('todos in parallel', function () use ($run, $snapshot) {
|
||||
expect($run('--todos', true))->toContain($snapshot('todos'));
|
||||
})->skipOnWindows();
|
||||
|
||||
test('todo', function () use ($run, $snapshot) {
|
||||
expect($run('--todos', false))->toContain($snapshot('todo'));
|
||||
expect($run('--todo', false))->toContain($snapshot('todo'));
|
||||
})->skipOnWindows();
|
||||
|
||||
test('todo in parallel', function () use ($run, $snapshot) {
|
||||
expect($run('--todos', true))->toContain($snapshot('todo'));
|
||||
expect($run('--todo', true))->toContain($snapshot('todo'));
|
||||
})->skipOnWindows();
|
||||
|
||||
Reference in New Issue
Block a user