Modernise Laravel Modules dependencies and add initial tests
This commit is contained in:
@@ -1,3 +1,6 @@
|
|||||||
.idea
|
.idea
|
||||||
vendor
|
vendor
|
||||||
composer.lock
|
composer.lock
|
||||||
|
.phpunit.result.cache
|
||||||
|
composer.json.bak-*
|
||||||
|
.phpunit.cache/
|
||||||
|
|||||||
+17
-11
@@ -16,17 +16,23 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=7.3",
|
"php": "^8.0",
|
||||||
"ext-json": "*"
|
"ext-json": "*",
|
||||||
|
"illuminate/support": "^8.0 || ^9.0 || ^10.0 || ^11.0 || ^12.0 || ^13.0",
|
||||||
|
"illuminate/console": "^8.0 || ^9.0 || ^10.0 || ^11.0 || ^12.0 || ^13.0",
|
||||||
|
"illuminate/contracts": "^8.0 || ^9.0 || ^10.0 || ^11.0 || ^12.0 || ^13.0",
|
||||||
|
"illuminate/database": "^8.0 || ^9.0 || ^10.0 || ^11.0 || ^12.0 || ^13.0",
|
||||||
|
"illuminate/filesystem": "^8.0 || ^9.0 || ^10.0 || ^11.0 || ^12.0 || ^13.0",
|
||||||
|
"illuminate/routing": "^8.0 || ^9.0 || ^10.0 || ^11.0 || ^12.0 || ^13.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "^8.5",
|
"phpunit/phpunit": "^12.5",
|
||||||
"mockery/mockery": "~1.0",
|
"mockery/mockery": "^1.6",
|
||||||
"orchestra/testbench": "^6.0",
|
"orchestra/testbench": "^11.0",
|
||||||
"friendsofphp/php-cs-fixer": "^2.16",
|
"friendsofphp/php-cs-fixer": "^3.0",
|
||||||
"laravel/framework": "^8.0",
|
"laravel/framework": "^13.0",
|
||||||
"spatie/phpunit-snapshot-assertions": "^2.1.0",
|
"spatie/phpunit-snapshot-assertions": "^5.4",
|
||||||
"phpstan/phpstan": "^0.12.14"
|
"phpstan/phpstan": "^2.0"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
@@ -61,7 +67,7 @@
|
|||||||
"test-coverage": "vendor/bin/phpunit --debug --coverage-html coverage",
|
"test-coverage": "vendor/bin/phpunit --debug --coverage-html coverage",
|
||||||
"pcf": "vendor/bin/php-cs-fixer fix --verbose"
|
"pcf": "vendor/bin/php-cs-fixer fix --verbose"
|
||||||
},
|
},
|
||||||
"minimum-stability": "dev",
|
"minimum-stability": "stable",
|
||||||
"prefer-stable": false,
|
"prefer-stable": true,
|
||||||
"type": "library"
|
"type": "library"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
|
||||||
|
bootstrap="vendor/autoload.php"
|
||||||
|
colors="true">
|
||||||
|
<testsuites>
|
||||||
|
<testsuite name="ABSDEV Laravel Modules">
|
||||||
|
<directory>tests</directory>
|
||||||
|
</testsuite>
|
||||||
|
</testsuites>
|
||||||
|
<php>
|
||||||
|
<env name="APP_ENV" value="testing"/>
|
||||||
|
<env name="DB_CONNECTION" value="sqlite"/>
|
||||||
|
<env name="DB_DATABASE" value=":memory:"/>
|
||||||
|
</php>
|
||||||
|
</phpunit>
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace absdev\Modules\Tests;
|
||||||
|
|
||||||
|
use absdev\Modules\LaravelModulesServiceProvider;
|
||||||
|
use Orchestra\Testbench\TestCase;
|
||||||
|
|
||||||
|
class ServiceProviderTest extends TestCase
|
||||||
|
{
|
||||||
|
protected function getPackageProviders($app)
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
LaravelModulesServiceProvider::class,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function test_service_provider_is_registered(): void
|
||||||
|
{
|
||||||
|
$this->assertTrue(
|
||||||
|
$this->app->providerIsLoaded(
|
||||||
|
LaravelModulesServiceProvider::class
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user