Skip to content

Commit 531be19

Browse files
committed
install pest
1 parent df90734 commit 531be19

File tree

6 files changed

+36
-6
lines changed

6 files changed

+36
-6
lines changed

.github/workflows/run-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,4 @@ jobs:
5050
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
5151
5252
- name: Execute tests
53-
run: vendor/bin/phpunit
53+
run: vendor/bin/pest

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@ vendor
44
tests/server/node_modules
55
tests/server/store.json
66
.php_cs.cache
7+
.idea
8+
.phpunit.result.cache
9+
package-lock.json

composer.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
],
1818
"require": {
1919
"ext-json": "*",
20-
"php": "^7.3|^8.0",
20+
"php": "^7.4|^8.0",
2121
"guzzlehttp/guzzle": "^6.3|^7.0",
2222
"laravel/framework": "^6.0|^7.0|^8.0|^9.0",
2323
"spatie/laravel-blink": "^1.3",
@@ -27,6 +27,7 @@
2727
"require-dev": {
2828
"mockery/mockery": "^1.4",
2929
"orchestra/testbench": "^4.0|^5.0|^6.0|^7.0",
30+
"pestphp/pest": "^1.22",
3031
"phpunit/phpunit": "^9.3"
3132
},
3233
"autoload": {
@@ -40,10 +41,13 @@
4041
}
4142
},
4243
"scripts": {
43-
"test": "vendor/bin/phpunit"
44+
"test": "vendor/bin/pest"
4445
},
4546
"config": {
46-
"sort-packages": true
47+
"sort-packages": true,
48+
"allow-plugins": {
49+
"pestphp/pest-plugin": true
50+
}
4751
},
4852
"extra": {
4953
"laravel": {

tests/Pest.php

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php
2+
3+
use Spatie\ServerMonitor\Test\TestCase;
4+
5+
/*
6+
|--------------------------------------------------------------------------
7+
| Test Case
8+
|--------------------------------------------------------------------------
9+
*/
10+
11+
uses(TestCase::class)->in('.');
12+
13+
/*
14+
|--------------------------------------------------------------------------
15+
| Expectations
16+
|--------------------------------------------------------------------------
17+
*/
18+
19+
/*
20+
|--------------------------------------------------------------------------
21+
| Functions
22+
|--------------------------------------------------------------------------
23+
*/

tests/TestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ abstract class TestCase extends Orchestra
2121
/** @var ?string */
2222
protected $consoleOutputCache;
2323

24-
public function setUp(): void
24+
protected function setUp(): void
2525
{
2626
Carbon::setTestNow(Carbon::create(2016, 1, 1, 00, 00, 00));
2727

tests/server/Input.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ class Input {
2525
}
2626
}
2727

28-
module.exports = Input;
28+
module.exports = Input;

0 commit comments

Comments
 (0)