8000 [SecurityBundle] Fix test · symfony/symfony@c93c9a5 · GitHub
[go: up one dir, main page]

Skip to content

Commit c93c9a5

Browse files
author
Robin Chalas
committed
[SecurityBundle] Fix test
1 parent feebe39 commit c93c9a5

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/Symfony/Bundle/SecurityBundle/Tests/Functional/MissingUserProviderTest.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,10 @@
1111

1212
namespace Symfony\Bundle\SecurityBundle\Tests\Functional;
1313

14+
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
15+
1416
class MissingUserProviderTest extends WebTestCase
1517
{
16-
/**
17-
* @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
18-
* @expectedExceptionMessage "default" firewall requires a user provider but none was defined.
19-
*/
2018
public function testUserProviderIsNeeded()
2119
{
2220
$client = $this->createClient(array('test_case' => 'MissingUserProvider', 'root_config' => 'config.yml'));
@@ -25,5 +23,11 @@ public function testUserProviderIsNeeded()
2523
'PHP_AUTH_USER' => 'username',
2624
'PHP_AUTH_PW' => 'pa$$word',
2725
));
26+
27+
$response = $client->getResponse();
28+
29+
$this->assertSame(500, $response->getStatusCode());
30+
$this->assertContains(InvalidConfigurationException::class, $response->getContent());
31+
$this->assertContains('"default" firewall requires a user provider but none was defined', htmlspecialchars_decode($response->getContent()));
2832
}
2933
}

0 commit comments

Comments
 (0)
0