Add phpstan

This commit is contained in:
philipp lang 2022-02-10 20:27:43 +01:00
parent 8a97cedbdb
commit 14723b4f58
4 changed files with 6618 additions and 3563 deletions

View File

@ -9,7 +9,9 @@
}
],
"require": {
"guzzlehttp/guzzle": "^6.3.1|^7.0"
"guzzlehttp/guzzle": "^6.3.1|^7.0",
"laravel/framework": "^8.0",
"laravel/ui": "^3.4"
},
"autoload": {
"psr-4": {
@ -22,7 +24,8 @@
}
},
"require-dev": {
"orchestra/testbench": "^6.0"
"orchestra/testbench": "^6.0",
"nunomaduro/larastan": "^1.0"
},
"extra": {
"laravel": {

10156
composer.lock generated

File diff suppressed because it is too large Load Diff

11
phpstan.neon Normal file
View File

@ -0,0 +1,11 @@
includes:
- ./vendor/nunomaduro/larastan/extension.neon
parameters:
paths:
- src
- tests
# The level 8 is the highest level
level: 6

View File

@ -17,13 +17,8 @@ class LoginTest extends TestCase
*/
public function test_first_successful_login()
{
Http::fake([
'https://nami.dpsg.de/ica/pages/login.jsp' => Http::response('<html></html>', 200),
'https://nami.dpsg.de/ica/rest/nami/auth/manual/sessionStartup' => Http::response($this->successJson, 200)
]);
Http::fake($this->login());
$this->setCredentials();
Nami::login();
Http::assertSent(function($request) {