Fix for phpcs

This commit is contained in:
James Tancock 2015-02-04 15:31:50 +00:00
parent b8b6b67abd
commit e173c29d33
3 changed files with 69 additions and 64 deletions

View file

@ -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);

View file

@ -22,17 +22,17 @@ App::uses('FlashComponent', 'Controller/Component');
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();
@ -40,20 +40,20 @@ class FlashComponentTest extends CakeTestCase {
}
/**
* 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 @@ class FlashComponentTest extends CakeTestCase {
}
/**
* testSetWithException method
*
* @return void
*/
* testSetWithException method
*
* @return void
*/
public function testSetWithException() {
$this->assertNull(CakeSession::read('Flash.flash'));
@ -121,10 +121,10 @@ class FlashComponentTest extends CakeTestCase {
}
/**
* testSetWithComponentConfiguration method
*
* @return void
*/
* testSetWithComponentConfiguration method
*
* @return void
*/
public function testSetWithComponentConfiguration() {
$this->assertNull(CakeSession::read('Flash.flash'));
@ -141,10 +141,10 @@ class FlashComponentTest extends CakeTestCase {
}
/**
* Test magic call method.
*
* @return void
*/
* Test magic call method.
*
* @return void
*/
public function testCall() {
$this->assertNull(CakeSession::read('Flash.flash'));

View file

@ -23,23 +23,28 @@ App::uses('View', 'View');
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 @@ class FlashHelperTest extends CakeTestCase {
));
}
/**
* 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 @@ class FlashHelperTest extends CakeTestCase {
$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 @@ class FlashHelperTest extends CakeTestCase {
$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)