Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c93c9a5

Browse filesBrowse files
author
Robin Chalas
committed
[SecurityBundle] Fix test
1 parent feebe39 commit c93c9a5
Copy full SHA for c93c9a5

File tree

1 file changed

+8
-4
lines changed
Filter options

1 file changed

+8
-4
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Tests/Functional/MissingUserProviderTest.php
+8-4Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.