Skip to content
Permalink
Browse files

Renamed enableRememberFlashMessages to enableRetainFlashMessages

  • Loading branch information...
jeremyharris committed May 15, 2017
1 parent a33cb7f commit 0a8471dfe8f4489cee2aa34541422812490ebc4d
Showing with 7 additions and 7 deletions.
  1. +6 −6 src/TestSuite/IntegrationTestCase.php
  2. +1 −1 tests/TestCase/TestSuite/IntegrationTestCaseTest.php
@@ -154,7 +154,7 @@ abstract class IntegrationTestCase extends TestCase
*
* @var bool
*/
protected $_rememberFlashMessages = false;
protected $_retainFlashMessages = false;
/**
* Stored flash messages before render
@@ -202,7 +202,7 @@ public function tearDown()
$this->_appArgs = null;
$this->_securityToken = false;
$this->_csrfToken = false;
$this->_rememberFlashMessages = false;
$this->_retainFlashMessages = false;
$this->_useHttpServer = false;
}
@@ -264,9 +264,9 @@ public function enableCsrfToken()
*
* @return void
*/
public function enableRememberFlashMessages()
public function enableRetainFlashMessages()
{
$this->_rememberFlashMessages = true;
$this->_retainFlashMessages = true;
}
/**
@@ -452,7 +452,7 @@ protected function _sendRequest($url, $method, $data = [])
$request = $this->_buildRequest($url, $method, $data);
$response = $dispatcher->execute($request);
$this->_requestSession = $request['session'];
if ($this->_rememberFlashMessages) {
if ($this->_retainFlashMessages) {
$this->_requestSession->write('Flash', $this->_flashMessages);
}
$this->_response = $response;
@@ -500,7 +500,7 @@ public function controllerSpy($event, $controller = null)
if (!$this->_viewName) {
$this->_viewName = $viewFile;
}
if ($this->_rememberFlashMessages) {
if ($this->_retainFlashMessages) {
$this->_flashMessages = $controller->request->session()->read('Flash');
}
});
@@ -413,7 +413,7 @@ public function testFlashSessionAndCookieAssertsHttpServer()
*/
public function testFlashAssertionsAfterRender()
{
$this->enableRememberFlashMessages();
$this->enableRetainFlashMessages();
$this->get('/posts/index/with_flash');
$this->assertSession('An error message', 'Flash.flash.0.message');

0 comments on commit 0a8471d

Please sign in to comment.
You can’t perform that action at this time.