Skip to content

Navigation Menu

Sign in
Appearance settings

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 493ce7a

Browse filesBrowse files
Merge branch '2.8' into 3.4
* 2.8: [HttpFoundation] update phpdoc of FlashBagInterface::add() bug #27701 [SecurityBundle] Dont throw if "security.http_utils" is not found (nicolas-grekas) [Validator] Fix the namespace of RegexTest
2 parents 7f9a262 + 1da4252 commit 493ce7a
Copy full SHA for 493ce7a

File tree

3 files changed

+14
-2
lines changed
Filter options

3 files changed

+14
-2
lines changed

‎src/Symfony/Component/HttpFoundation/Session/Flash/FlashBagInterface.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpFoundation/Session/Flash/FlashBagInterface.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ interface FlashBagInterface extends SessionBagInterface
2424
* Adds a flash message for type.
2525
*
2626
* @param string $type
27-
* @param string $message
27+
* @param mixed $message
2828
*/
2929
public function add($type, $message);
3030

‎src/Symfony/Component/HttpFoundation/Tests/Session/Flash/FlashBagTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpFoundation/Tests/Session/Flash/FlashBagTest.php
+12Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,18 @@ public function testPeek()
7474
$this->assertEquals(array('A previous flash message'), $this->bag->peek('notice'));
7575
}
7676

77+
public function testAdd()
78+
{
79+
$tab = array('bar' => 'baz');
80+
$this->bag->add('string_message', 'lorem');
81+
$this->bag->add('object_message', new \stdClass());
82+
$this->bag->add('array_message', $tab);
83+
84+
$this->assertEquals(array('lorem'), $this->bag->get('string_message'));
85+
$this->assertEquals(array(new \stdClass()), $this->bag->get('object_message'));
86+
$this->assertEquals(array($tab), $this->bag->get('array_message'));
87+
}
88+
7789
public function testGet()
7890
{
7991
$this->assertEquals(array(), $this->bag->get('non_existing'));

‎src/Symfony/Component/Validator/Tests/Constraints/RegexTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Tests/Constraints/RegexTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace Constraints;
12+
namespace Symfony\Component\Validator\Tests\Constraints;
1313

1414
use PHPUnit\Framework\TestCase;
1515
use Symfony\Component\Validator\Constraints\Regex;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.