[SecurityBundle] Fix test
This commit is contained in:
parent
feebe39efb
commit
c93c9a5880
@ -11,12 +11,10 @@
|
||||
|
||||
namespace Symfony\Bundle\SecurityBundle\Tests\Functional;
|
||||
|
||||
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
|
||||
|
||||
class MissingUserProviderTest extends WebTestCase
|
||||
{
|
||||
/**
|
||||
* @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
|
||||
* @expectedExceptionMessage "default" firewall requires a user provider but none was defined.
|
||||
*/
|
||||
public function testUserProviderIsNeeded()
|
||||
{
|
||||
$client = $this->createClient(array('test_case' => 'MissingUserProvider', 'root_config' => 'config.yml'));
|
||||
@ -25,5 +23,11 @@ class MissingUserProviderTest extends WebTestCase
|
||||
'PHP_AUTH_USER' => 'username',
|
||||
'PHP_AUTH_PW' => 'pa$$word',
|
||||
));
|
||||
|
||||
$response = $client->getResponse();
|
||||
|
||||
$this->assertSame(500, $response->getStatusCode());
|
||||
$this->assertContains(InvalidConfigurationException::class, $response->getContent());
|
||||
$this->assertContains('"default" firewall requires a user provider but none was defined', htmlspecialchars_decode($response->getContent()));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user