Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Renamed enableRememberFlashMessages to enableRetainFlashMessages
  • Loading branch information
jeremyharris committed May 15, 2017
1 parent a33cb7f commit 0a8471d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/TestSuite/IntegrationTestCase.php
Expand Up @@ -154,7 +154,7 @@ abstract class IntegrationTestCase extends TestCase
*
* @var bool
*/
protected $_rememberFlashMessages = false;
protected $_retainFlashMessages = false;

/**
* Stored flash messages before render
Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -264,9 +264,9 @@ public function enableCsrfToken()
*
* @return void
*/
public function enableRememberFlashMessages()
public function enableRetainFlashMessages()
{
$this->_rememberFlashMessages = true;
$this->_retainFlashMessages = true;
}

/**
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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');
}
});
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/TestSuite/IntegrationTestCaseTest.php
Expand Up @@ -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');
Expand Down

0 comments on commit 0a8471d

Please sign in to comment.