Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 493ce7a

Browse 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

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

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

Lines 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

Lines 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

Lines 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)