Skip to content

Commit 403a600

Browse files
committed
test: config tests
1 parent c9f2ff4 commit 403a600

File tree

4 files changed

+38
-2
lines changed

4 files changed

+38
-2
lines changed

composer.json

+18-2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
},
2525
"require-dev": {
2626
"laravel/pint": "^1.13",
27+
"orchestra/testbench": "^8.15",
2728
"pestphp/pest": "^2.19.2",
2829
"phpstan/phpstan": "^1.10.34",
2930
"rector/rector": "^0.18.3",
@@ -39,7 +40,10 @@
3940
},
4041
"autoload-dev": {
4142
"psr-4": {
42-
"Tests\\": "tests/"
43+
"Tests\\": "tests/",
44+
"Workbench\\App\\": "workbench/app/",
45+
"Workbench\\Database\\Factories\\": "workbench/database/factories/",
46+
"Workbench\\Database\\Seeders\\": "workbench/database/seeders/"
4347
}
4448
},
4549
"minimum-stability": "stable",
@@ -70,6 +74,18 @@
7074
"@test:lint",
7175
"@test:types",
7276
"@test:unit"
77+
],
78+
"post-autoload-dump": [
79+
"@clear",
80+
"@prepare"
81+
],
82+
"clear": "@php vendor/bin/testbench package:purge-skeleton --ansi",
83+
"prepare": "@php vendor/bin/testbench package:discover --ansi",
84+
"build": "@php vendor/bin/testbench workbench:build --ansi",
85+
"serve": [
86+
"Composer\\Config::disableProcessTimeout",
87+
"@build",
88+
"@php vendor/bin/testbench serve"
7389
]
7490
}
75-
}
91+
}

tests/Feature/ArchTest.php

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?php
2+
3+
test('should not use debug functions')
4+
->expect(['dd', 'dump'])
5+
->not->toBeUsed();

tests/TestCase.php

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
3+
namespace Tests;
4+
5+
use Orchestra\Testbench\TestCase as BaseTestCase;
6+
7+
abstract class TestCase extends BaseTestCase
8+
{
9+
//
10+
}

tests/Unit/ExampleTest.php

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?php
2+
3+
test('example', function () {
4+
expect(true)->toBeTrue();
5+
});

0 commit comments

Comments
 (0)