Я запускаю запасную опцию adldap2 в laravel, я не переопределяю функции setupUp или tearDown, мои тесты выглядят так:
/** @test */
public function login_via_created_user_and_logout()
{
$user = factory(User::class)->create(['password' => bcrypt(123456)]);
$response = $this->post('/api/auth/login', [
'email' => $user->username,
'password' => 123456
]);
$response->dump();
$this->assertAuthenticatedAs(User::where('email', $user->username)->first());
$this->json('POST', '/api/auth/logout', ['Authorization' => 'Bearer ' . $response->original['access_token']]);
$this->assertGuest();
}
/** @test */
public function login_ldap_and_logout_user()
{
// need at static user
$response = $this->post('/api/auth/login', [
'email' => '[username]',
'password' => '[password]'
]);
$response->assertOk();
$this->assertAuthenticatedAs(User::find(1));
$this->json('POST', '/api/auth/logout', ['Authorization' => 'Bearer ' . $response->original['access_token']]);
$this->assertGuest();
}
Когда они запускаются, clear && php artisan config:clear && phpunit --filter=login_ldap_and_logout_user
они проходят,но когда я запускаю их без фильтрации, они не работают на testing.ERROR: Class config does not exist {"exception":"[object] (ReflectionException(code: -1): Class config does not exist at