Permalink
Browse files

Fix for phpcs

  • Loading branch information...
tanuck committed Feb 4, 2015
1 parent b8b6b67 commit e173c29d332e1308d5656775bc332ddbb42ba9a6
@@ -43,8 +43,8 @@ class FlashComponent extends Component {
/**
* Constructor
*
* @param ComponentCollection $collection
* @param array $settings
* @param ComponentCollection $collection The ComponentCollection object
* @param array $settings Settings passed via controller
*/
public function __construct(ComponentCollection $collection, $settings = array()) {
$this->_defaultConfig = Hash::merge($this->_defaultConfig, $settings);
@@ -22,38 +22,38 @@
App::uses('ComponentCollection', 'Controller');
/**
* FlashComponentTest class
*
* @package Cake.Test.Case.Controller.Component
*/
* FlashComponentTest class
*
* @package Cake.Test.Case.Controller.Component
*/
class FlashComponentTest extends CakeTestCase {
/**
* setUp method
*
* @return void
*/
* setUp method
*
* @return void
*/
public function setUp() {
parent::setUp();
$this->Components = new ComponentCollection();
$this->Flash = new FlashComponent($this->Components);
}
/**
* tearDown method
*
* @return void
*/
* tearDown method
*
* @return void
*/
public function tearDown() {
parent::tearDown();
CakeSession::destroy();
}
/**
* testSet method
*
* @return void
*/
* testSet method
*
* @return void
*/
public function testSet() {
$this->assertNull(CakeSession::read('Flash.flash'));
@@ -102,10 +102,10 @@ public function testSet() {
}
/**
* testSetWithException method
*
* @return void
*/
* testSetWithException method
*
* @return void
*/
public function testSetWithException() {
$this->assertNull(CakeSession::read('Flash.flash'));
@@ -121,10 +121,10 @@ public function testSetWithException() {
}
/**
* testSetWithComponentConfiguration method
*
* @return void
*/
* testSetWithComponentConfiguration method
*
* @return void
*/
public function testSetWithComponentConfiguration() {
$this->assertNull(CakeSession::read('Flash.flash'));
@@ -141,10 +141,10 @@ public function testSetWithComponentConfiguration() {
}
/**
* Test magic call method.
*
* @return void
*/
* Test magic call method.
*
* @return void
*/
public function testCall() {
$this->assertNull(CakeSession::read('Flash.flash'));
@@ -23,23 +23,28 @@
App::uses('CakePlugin', 'Core');
/**
* FlashHelperTest class
*
* @package Cake.Test.Case.View.Helper
*/
* FlashHelperTest class
*
* @package Cake.Test.Case.View.Helper
*/
class FlashHelperTest extends CakeTestCase {
/**
* setupBeforeClass method
*
* @return void
*/
public static function setupBeforeClass() {
App::build(array(
'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS)
));
}
/**
* setUp method
*
* @return void
*/
/**
* setUp method
*
* @return void
*/
public function setUp() {
parent::setUp();
$controller = null;
@@ -76,22 +81,22 @@ public function setUp() {
));
}
/**
* tearDown method
*
* @return void
*/
/**
* tearDown method
*
* @return void
*/
public function tearDown() {
parent::tearDown();
unset($this->View, $this->Flash);
CakeSession::destroy();
}
/**
* testFlash method
*
* @return void
*/
/**
* testFlash method
*
* @return void
*/
public function testFlash() {
$result = $this->Flash->render();
$expected = '<div class="message">This is a calling</div>';
@@ -109,21 +114,21 @@ public function testFlash() {
$this->assertNull($this->Flash->render('non-existent'));
}
/**
* testFlashThrowsException
*
* @expectedException UnexpectedValueException
*/
/**
* testFlashThrowsException
*
* @expectedException UnexpectedValueException
*/
public function testFlashThrowsException() {
CakeSession::write('Flash.foo', 'bar');
$this->Flash->render('foo');
}
/**
* test setting the element from the attrs.
*
* @return void
*/
/**
* test setting the element from the attrs.
*
* @return void
*/
public function testFlashElementInAttrs() {
$result = $this->Flash->render('notification', array(
'element' => 'flash_helper',
@@ -135,11 +140,11 @@ public function testFlashElementInAttrs() {
$this->assertContains($expected, $result);
}
/**
* test using elements in plugins.
*
* @return void
*/
/**
* test using elements in plugins.
*
* @return void
*/
public function testFlashWithPluginElement() {
App::build(array(
'Plugin' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)

0 comments on commit e173c29

Please sign in to comment.