From dea32345c8ef2fad80f3966a3047a10f42a39ba7 Mon Sep 17 00:00:00 2001 From: mark_story Date: Sat, 17 Oct 2015 20:54:40 -0400 Subject: [PATCH] Add failing test for #7570 Documented behavior that exists in 3.x is not working in 2.x --- .../Case/Controller/Component/FlashComponentTest.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/Cake/Test/Case/Controller/Component/FlashComponentTest.php b/lib/Cake/Test/Case/Controller/Component/FlashComponentTest.php index 56905c54555..64fe0ec7f25 100644 --- a/lib/Cake/Test/Case/Controller/Component/FlashComponentTest.php +++ b/lib/Cake/Test/Case/Controller/Component/FlashComponentTest.php @@ -158,6 +158,16 @@ public function testCall() { $result = CakeSession::read('Message.flash'); $this->assertEquals($expected, $result); + $this->Flash->alert('It worked', array('plugin' => 'MyPlugin')); + $expected = array( + 'message' => 'It worked', + 'key' => 'flash', + 'element' => 'MyPlugin.Flash/alert', + 'params' => array() + ); + $result = CakeSession::read('Message.flash'); + $this->assertEquals($expected, $result); + $this->Flash->error('It did not work', array('element' => 'error_thing')); $expected = array( 'message' => 'It did not work',