Skip to content

Commit

Permalink
Tweaks versions and configure PHPUnit
Browse files Browse the repository at this point in the history
  • Loading branch information
tonysm committed Mar 7, 2024
1 parent dc810a4 commit 0c3b4bd
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 40 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest]
php: [8.2]
laravel: [10.*]
laravel: [10.*, 11.*]
stability: [prefer-lowest, prefer-stable]
include:
- laravel: 10.*
testbench: 8.*
- laravel: 11.*
testbench: 9.*

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
.php_cs.cache
.php-cs-fixer.cache
.phpunit.result.cache
.phpunit.cache
build
composer.lock
coverage
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
],
"require": {
"php": "^8.2",
"illuminate/support": "^10.0"
"illuminate/support": "^10.0|^11.0"
},
"require-dev": {
"laravel/pint": "^1.10",
"orchestra/testbench": "^8.14",
"orchestra/workbench": "^1.0",
"phpunit/phpunit": "^9.6"
"orchestra/testbench": "^8.14|^9.0",
"orchestra/workbench": "^1.0|^8.3",
"phpunit/phpunit": "^10.5"
},
"autoload": {
"psr-4": {
Expand Down
39 changes: 17 additions & 22 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,34 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
verbose="true"
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
backupGlobals="false"
bootstrap="vendor/autoload.php"
colors="true"
processIsolation="false"
stopOnFailure="false"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
cacheDirectory=".phpunit.cache"
backupStaticProperties="false"
>
<testsuites>
<testsuite name="Turbo Laravel Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<coverage>
<include>
<directory suffix=".php">./src</directory>
</include>
<report>
<html outputDirectory="build/coverage"/>
<text outputFile="build/coverage.txt"/>
<clover outputFile="build/logs/clover.xml"/>
</report>
</coverage>
<logging>
<junit outputFile="build/report.junit.xml"/>
<junit outputFile="build/report.junit.xml" />
</logging>
<php>
<env name="APP_KEY" value="a2ps3dFoNmyehsm7r0VFZ0Iq64hwBpqI"/>
<env name="APP_KEY" value="a2ps3dFoNmyehsm7r0VFZ0Iq64hwBpqI" />
</php>
<source>
<include>
<directory suffix=".php">./src</directory>
</include>
</source>
</phpunit>
19 changes: 6 additions & 13 deletions tests/TurboStreamsBroadcastingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,15 @@ protected function setUp(): void
TurboStream::fake();
}

public function turboStreamDefaultInsertActions()
{
return [
['append'],
['prepend'],
['before'],
['after'],
['update'],
['replace'],
];
}

/**
* @test
*
* @dataProvider turboStreamDefaultInsertActions
* @testWith ["append"]
* ["prepend"]
* ["before"]
* ["after"]
* ["update"]
* ["replace"]
*/
public function can_manually_broadcast_append_streams(string $action)
{
Expand Down

0 comments on commit 0c3b4bd

Please sign in to comment.