Skip to content

Commit d7ffe65

Browse files
committedSep 15, 2024
Update tests.
1 parent 3cb9a6d commit d7ffe65

File tree

3 files changed

+53
-7
lines changed

3 files changed

+53
-7
lines changed
 

‎.github/workflows/tests.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Tablar Tests
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v3
15+
16+
- name: Setup PHP
17+
uses: shivammathur/setup-php@v2
18+
with:
19+
php-version: '8.2'
20+
21+
- name: Install Dependencies
22+
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
23+
24+
- name: Create Database
25+
run: |
26+
mkdir -p database
27+
touch database/database.sqlite
28+
29+
- name: Execute tests via PHPUnit
30+
env:
31+
DB_CONNECTION: sqlite
32+
DB_DATABASE: database/database.sqlite
33+
run: vendor/bin/phpunit

‎composer.json

+3-7
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,8 @@
2121
"laravel/ui": "~4"
2222
},
2323
"require-dev": {
24-
"phpunit/phpunit": ">=9.1",
25-
"orchestra/testbench": ">=9.0",
26-
"scrutinizer/ocular": "^1.9"
24+
"phpunit/phpunit": ">=10.0",
25+
"orchestra/testbench": ">=9.0"
2726
},
2827
"autoload": {
2928
"psr-4": {
@@ -33,10 +32,7 @@
3332
"autoload-dev": {
3433
"psr-4": {
3534
"TakiElias\\Tablar\\Tests\\": "tests/"
36-
},
37-
"classmap": [
38-
"tests/TestCase.php"
39-
]
35+
}
4036
},
4137
"extra": {
4238
"branch-alias": {

‎phpunit.xml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" backupGlobals="false"
3+
colors="true" processIsolation="false" stopOnFailure="false"
4+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd" cacheDirectory=".phpunit.cache"
5+
backupStaticProperties="false">
6+
<testsuites>
7+
<testsuite name="Package">
8+
<directory suffix=".php">./tests/Menu</directory>
9+
<exclude>tests/TestCase.php</exclude>
10+
</testsuite>
11+
</testsuites>
12+
<source>
13+
<include>
14+
<directory>src/</directory>
15+
</include>
16+
</source>
17+
</phpunit>

0 commit comments

Comments
 (0)