Skip to content
This repository has been archived by the owner on Sep 15, 2023. It is now read-only.

Commit

Permalink
Require at least Laravel 9.x (#104)
Browse files Browse the repository at this point in the history
* Require at least Laravel 9.x

* Fix phpunit configuration

* Require at least PhpUnit 10.3

Otherwise the configuration would not work.

* Make tests pass on Windows

Man, I hate Windows for using backslashes as their directory separator.

Use directory separator in config

* Use v2 of composer-install GitHub Action
  • Loading branch information
svenluijten committed Aug 11, 2023
1 parent 5168731 commit cd080f9
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Expand Up @@ -22,7 +22,7 @@ jobs:
coverage: none

- name: Install dependencies
uses: ramsey/composer-install@v1
uses: ramsey/composer-install@v2
with:
dependency-versions: ${{ matrix.dependency-version }}
composer-options: "--prefer-dist"
Expand Down
7 changes: 4 additions & 3 deletions composer.json
Expand Up @@ -18,11 +18,12 @@
],
"require": {
"php": "^8.1",
"illuminate/console": "^8.0 || ^9.0 || ^10.0"
"illuminate/console": "^9.0 || ^10.0"
},
"require-dev": {
"orchestra/testbench": "^6.8",
"sven/laravel-view-assertions": "^1.0"
"orchestra/testbench": "^8.0",
"sven/laravel-view-assertions": "^1.1",
"phpunit/phpunit": "^10.3"
},
"autoload": {
"psr-4": {
Expand Down
15 changes: 3 additions & 12 deletions phpunit.xml.dist
@@ -1,25 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.3/phpunit.xsd"
backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
verbose="true"
>
<coverage>
<include>
<directory suffix=".php">src/</directory>
</include>
</coverage>
<coverage/>
<testsuites>
<testsuite name="Artisan View Test Suite">
<directory suffix=".php">./tests/</directory>
<directory suffix="Test.php">./tests/</directory>
</testsuite>
</testsuites>
</phpunit>
2 changes: 1 addition & 1 deletion tests/TestCase.php
Expand Up @@ -12,7 +12,7 @@ protected function getEnvironmentSetUp($app): void
@mkdir(__DIR__.'/resources/views', 0755, true);

$app->config->set('view.paths', [
__DIR__.'/resources/views',
__DIR__.DIRECTORY_SEPARATOR.'resources'.DIRECTORY_SEPARATOR.'views',
]);

$app->register(ServiceProvider::class);
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/BlockBuilderTest.php
Expand Up @@ -23,7 +23,7 @@ public function it_renders_out_the_blocks_in_the_right_order(Config $config, str
$this->assertEquals($contents, $builder->build($config));
}

public function orderProvider(): array
public static function orderProvider(): array
{
return [
'extend, section, and inline section' => [
Expand Down

0 comments on commit cd080f9

Please sign in to comment.