Fix 4.3 tests forward compat

This commit is contained in:
Yonel Ceruto 2019-09-05 11:34:38 -04:00
parent 828e5a4ae3
commit f092331eb1
3 changed files with 8 additions and 4 deletions

View File

@ -15,13 +15,16 @@ class MissingUserProviderTest extends AbstractWebTestCase
{
public function testUserProviderIsNeeded()
{
$this->expectException('Symfony\Component\Config\Definition\Exception\InvalidConfigurationException');
$this->expectExceptionMessage('"default" firewall requires a user provider but none was defined.');
$client = $this->createClient(['test_case' => 'MissingUserProvider', 'root_config' => 'config.yml']);
$client = $this->createClient(['test_case' => 'MissingUserProvider', 'root_config' => 'config.yml', 'debug' => true]);
$client->request('GET', '/', [], [], [
'PHP_AUTH_USER' => 'username',
'PHP_AUTH_PW' => 'pa$$word',
]);
$response = $client->getResponse();
$this->assertSame(500, $response->getStatusCode());
$this->stringContains('Symfony\Component\Config\Definition\Exception\InvalidConfigurationException', $response->getContent());
$this->stringContains('"default" firewall requires a user provider but none was defined.', $response->getContent());
}
}

View File

@ -16,5 +16,6 @@ use Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\MissingUserProviderBun
return [
new FrameworkBundle(),
new SecurityBundle(),
new Symfony\Bundle\TwigBundle\TwigBundle(),
new MissingUserProviderBundle(),
];

View File

@ -1,5 +1,5 @@
imports:
- { resource: ./../config/framework.yml }
- { resource: ./../config/default.yml }
security:
firewalls: