minor #33479 [SecurityBundle] Fix 4.3 tests forward compat (yceruto)
This PR was merged into the 4.3 branch.
Discussion
----------
[SecurityBundle] Fix 4.3 tests forward compat
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/33478
| License | MIT
| Doc PR | -
Commits
-------
f092331eb1
Fix 4.3 tests forward compat
This commit is contained in:
commit
2feae7bebb
@ -15,13 +15,16 @@ class MissingUserProviderTest extends AbstractWebTestCase
|
|||||||
{
|
{
|
||||||
public function testUserProviderIsNeeded()
|
public function testUserProviderIsNeeded()
|
||||||
{
|
{
|
||||||
$this->expectException('Symfony\Component\Config\Definition\Exception\InvalidConfigurationException');
|
$client = $this->createClient(['test_case' => 'MissingUserProvider', 'root_config' => 'config.yml', 'debug' => true]);
|
||||||
$this->expectExceptionMessage('"default" firewall requires a user provider but none was defined.');
|
|
||||||
$client = $this->createClient(['test_case' => 'MissingUserProvider', 'root_config' => 'config.yml']);
|
|
||||||
|
|
||||||
$client->request('GET', '/', [], [], [
|
$client->request('GET', '/', [], [], [
|
||||||
'PHP_AUTH_USER' => 'username',
|
'PHP_AUTH_USER' => 'username',
|
||||||
'PHP_AUTH_PW' => 'pa$$word',
|
'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());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,5 +16,6 @@ use Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\MissingUserProviderBun
|
|||||||
return [
|
return [
|
||||||
new FrameworkBundle(),
|
new FrameworkBundle(),
|
||||||
new SecurityBundle(),
|
new SecurityBundle(),
|
||||||
|
new Symfony\Bundle\TwigBundle\TwigBundle(),
|
||||||
new MissingUserProviderBundle(),
|
new MissingUserProviderBundle(),
|
||||||
];
|
];
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
imports:
|
imports:
|
||||||
- { resource: ./../config/framework.yml }
|
- { resource: ./../config/default.yml }
|
||||||
|
|
||||||
security:
|
security:
|
||||||
firewalls:
|
firewalls:
|
||||||
|
Reference in New Issue
Block a user