File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
src/Symfony/Bundle/SecurityBundle/Tests/Functional Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 11
11
12
12
namespace Symfony \Bundle \SecurityBundle \Tests \Functional ;
13
13
14
+ use Symfony \Component \Config \Definition \Exception \InvalidConfigurationException ;
15
+
14
16
class MissingUserProviderTest extends WebTestCase
15
17
{
16
- /**
17
- * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
18
- * @expectedExceptionMessage "default" firewall requires a user provider but none was defined.
19
- */
20
18
public function testUserProviderIsNeeded ()
21
19
{
22
20
$ client = $ this ->createClient (array ('test_case ' => 'MissingUserProvider ' , 'root_config ' => 'config.yml ' ));
@@ -25,5 +23,11 @@ public function testUserProviderIsNeeded()
25
23
'PHP_AUTH_USER ' => 'username ' ,
26
24
'PHP_AUTH_PW ' => 'pa$$word ' ,
27
25
));
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 ()));
28
32
}
29
33
}
You can’t perform that action at this time.
0 commit comments