Skip to content

Commit

Permalink
Fix for phpcs
Browse files Browse the repository at this point in the history
  • Loading branch information
tanuck committed Feb 4, 2015
1 parent b8b6b67 commit e173c29
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 64 deletions.
4 changes: 2 additions & 2 deletions lib/Cake/Controller/Component/FlashComponent.php
Expand Up @@ -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);
Expand Down
56 changes: 28 additions & 28 deletions lib/Cake/Test/Case/Controller/Component/FlashComponentTest.php
Expand Up @@ -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'));

Expand Down Expand Up @@ -102,10 +102,10 @@ public function testSet() {
}

/**
* testSetWithException method
*
* @return void
*/
* testSetWithException method
*
* @return void
*/
public function testSetWithException() {
$this->assertNull(CakeSession::read('Flash.flash'));

Expand All @@ -121,10 +121,10 @@ public function testSetWithException() {
}

/**
* testSetWithComponentConfiguration method
*
* @return void
*/
* testSetWithComponentConfiguration method
*
* @return void
*/
public function testSetWithComponentConfiguration() {
$this->assertNull(CakeSession::read('Flash.flash'));

Expand All @@ -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'));

Expand Down
73 changes: 39 additions & 34 deletions lib/Cake/Test/Case/View/Helper/FlashHelperTest.php
Expand Up @@ -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;
Expand Down Expand Up @@ -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>';
Expand All @@ -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',
Expand All @@ -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)
Expand Down

0 comments on commit e173c29

Please sign in to comment.