Skip to content

Commit 2410ade

Browse files
committed
add customer/session to initLayoutMessages #92
1 parent ba91c11 commit 2410ade

File tree

4 files changed

+28
-11
lines changed

4 files changed

+28
-11
lines changed

README.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
11
Lesti_Fpc
22
=========
33

4-
## Build Status
5-
6-
* Master:
7-
[![Build Status](https://travis-ci.org/GordonLesti/Lesti_Fpc.svg?branch=master)](https://travis-ci.org/GordonLesti/Lesti_Fpc)
8-
[![Coverage Status](https://coveralls.io/repos/GordonLesti/Lesti_Fpc/badge.png?branch=master)](https://coveralls.io/r/GordonLesti/Lesti_Fpc?branch=master)
9-
* Develop:
10-
[![Build Status](https://travis-ci.org/GordonLesti/Lesti_Fpc.svg?branch=develop)](https://travis-ci.org/GordonLesti/Lesti_Fpc)
11-
[![Coverage Status](https://coveralls.io/repos/GordonLesti/Lesti_Fpc/badge.png?branch=develop)](https://coveralls.io/r/GordonLesti/Lesti_Fpc?branch=develop)
4+
Branch | Build Status | Coverage
5+
--- | --- | ---
6+
Master | [![Build Status](https://img.shields.io/travis/GordonLesti/Lesti_Fpc/master.svg?style=flat-square)](https://travis-ci.org/GordonLesti/Lesti_Fpc) | [![Coverage Status](https://img.shields.io/coveralls/GordonLesti/Lesti_Fpc/master.svg?style=flat-square)](https://coveralls.io/r/GordonLesti/Lesti_Fpc?branch=master)
7+
Develop | [![Build Status](https://img.shields.io/travis/GordonLesti/Lesti_Fpc/develop.svg?style=flat-square)](https://travis-ci.org/GordonLesti/Lesti_Fpc) | [![Coverage Status](https://img.shields.io/coveralls/GordonLesti/Lesti_Fpc/develop.svg?style=flat-square)](https://coveralls.io/r/GordonLesti/Lesti_Fpc?branch=develop)
128

139
## Release Information
1410

15-
*Lesti_Fpc 1.3.6*
11+
*Lesti_Fpc 1.3.7*
1612

1713
## System Requirements
1814

app/code/community/Lesti/Fpc/Helper/Block/Messages.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class Lesti_Fpc_Helper_Block_Messages extends Mage_Core_Helper_Abstract
2323
public function initLayoutMessages(
2424
Mage_Core_Model_Layout $layout,
2525
$messagesStorage =
26-
array('catalog/session', 'tag/session', 'checkout/session')
26+
array('catalog/session', 'tag/session', 'checkout/session', 'customer/session')
2727
)
2828
{
2929
$block = $layout->getMessagesBlock();

app/code/community/Lesti/Fpc/Test/Helper/Block/Messages.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,27 @@ public function testInitLayoutMessagesCheckout()
100100
$this->assertCount(2, $messages);
101101
}
102102

103+
/**
104+
* @test
105+
*/
106+
public function testInitLayoutMessagesCustomer()
107+
{
108+
$layout = Mage::app()->getLayout();
109+
/** @var Mage_Customer_Model_Session $customerStorage */
110+
$customerStorage = Mage::getSingleton('customer/session');
111+
$customerStorage->addSuccess('Fpc is cool.');
112+
$customerStorage->addError('Fpc has no errors.');
113+
$this->assertInstanceOf(
114+
'Mage_Core_Model_Layout',
115+
$this->_messagesHelper->initLayoutMessages($layout)
116+
);
117+
118+
// test if session is now empty
119+
$this->assertEquals(0, $customerStorage->getMessages()->count());
120+
$messages = $layout->getMessagesBlock()->getMessages();
121+
$this->assertCount(2, $messages);
122+
}
123+
103124
/**
104125
* @test
105126
* @expectedException Mage_Core_exception

app/code/community/Lesti/Fpc/etc/config.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<config>
1616
<modules>
1717
<Lesti_Fpc>
18-
<version>1.3.6</version>
18+
<version>1.3.7</version>
1919
</Lesti_Fpc>
2020
</modules>
2121
<global>

0 commit comments

Comments
 (0)