Modernise Laravel Modules dependencies and add initial tests
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
.idea
|
||||
vendor
|
||||
composer.lock
|
||||
.phpunit.result.cache
|
||||
composer.json.bak-*
|
||||
.phpunit.cache/
|
||||
|
||||
+17
-11
@@ -16,17 +16,23 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=7.3",
|
||||
"ext-json": "*"
|
||||
"php": "^8.0",
|
||||
"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": {
|
||||
"phpunit/phpunit": "^8.5",
|
||||
"mockery/mockery": "~1.0",
|
||||
"orchestra/testbench": "^6.0",
|
||||
"friendsofphp/php-cs-fixer": "^2.16",
|
||||
"laravel/framework": "^8.0",
|
||||
"spatie/phpunit-snapshot-assertions": "^2.1.0",
|
||||
"phpstan/phpstan": "^0.12.14"
|
||||
"phpunit/phpunit": "^12.5",
|
||||
"mockery/mockery": "^1.6",
|
||||
"orchestra/testbench": "^11.0",
|
||||
"friendsofphp/php-cs-fixer": "^3.0",
|
||||
"laravel/framework": "^13.0",
|
||||
"spatie/phpunit-snapshot-assertions": "^5.4",
|
||||
"phpstan/phpstan": "^2.0"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
@@ -61,7 +67,7 @@
|
||||
"test-coverage": "vendor/bin/phpunit --debug --coverage-html coverage",
|
||||
"pcf": "vendor/bin/php-cs-fixer fix --verbose"
|
||||
},
|
||||
"minimum-stability": "dev",
|
||||
"prefer-stable": false,
|
||||
"minimum-stability": "stable",
|
||||
"prefer-stable": true,
|
||||
"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