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 * Constructor
* *
* @param ComponentCollection $collection * @param ComponentCollection $collection The ComponentCollection object
* @param array $settings * @param array $settings Settings passed via controller
*/ */
public function __construct(ComponentCollection $collection, $settings = array()) { public function __construct(ComponentCollection $collection, $settings = array()) {
$this->_defaultConfig = Hash::merge($this->_defaultConfig, $settings); $this->_defaultConfig = Hash::merge($this->_defaultConfig, $settings);

View file

@ -22,17 +22,17 @@ App::uses('FlashComponent', 'Controller/Component');
App::uses('ComponentCollection', 'Controller'); App::uses('ComponentCollection', 'Controller');
/** /**
* FlashComponentTest class * FlashComponentTest class
* *
* @package Cake.Test.Case.Controller.Component * @package Cake.Test.Case.Controller.Component
*/ */
class FlashComponentTest extends CakeTestCase { class FlashComponentTest extends CakeTestCase {
/** /**
* setUp method * setUp method
* *
* @return void * @return void
*/ */
public function setUp() { public function setUp() {
parent::setUp(); parent::setUp();
$this->Components = new ComponentCollection(); $this->Components = new ComponentCollection();
@ -40,20 +40,20 @@ class FlashComponentTest extends CakeTestCase {
} }
/** /**
* tearDown method * tearDown method
* *
* @return void * @return void
*/ */
public function tearDown() { public function tearDown() {
parent::tearDown(); parent::tearDown();
CakeSession::destroy(); CakeSession::destroy();
} }
/** /**
* testSet method * testSet method
* *
* @return void * @return void
*/ */
public function testSet() { public function testSet() {
$this->assertNull(CakeSession::read('Flash.flash')); $this->assertNull(CakeSession::read('Flash.flash'));
@ -102,10 +102,10 @@ class FlashComponentTest extends CakeTestCase {
} }
/** /**
* testSetWithException method * testSetWithException method
* *
* @return void * @return void
*/ */
public function testSetWithException() { public function testSetWithException() {
$this->assertNull(CakeSession::read('Flash.flash')); $this->assertNull(CakeSession::read('Flash.flash'));
@ -121,10 +121,10 @@ class FlashComponentTest extends CakeTestCase {
} }
/** /**
* testSetWithComponentConfiguration method * testSetWithComponentConfiguration method
* *
* @return void * @return void
*/ */
public function testSetWithComponentConfiguration() { public function testSetWithComponentConfiguration() {
$this->assertNull(CakeSession::read('Flash.flash')); $this->assertNull(CakeSession::read('Flash.flash'));
@ -141,10 +141,10 @@ class FlashComponentTest extends CakeTestCase {
} }
/** /**
* Test magic call method. * Test magic call method.
* *
* @return void * @return void
*/ */
public function testCall() { public function testCall() {
$this->assertNull(CakeSession::read('Flash.flash')); $this->assertNull(CakeSession::read('Flash.flash'));

View file

@ -23,19 +23,24 @@ App::uses('View', 'View');
App::uses('CakePlugin', 'Core'); App::uses('CakePlugin', 'Core');
/** /**
* FlashHelperTest class * FlashHelperTest class
* *
* @package Cake.Test.Case.View.Helper * @package Cake.Test.Case.View.Helper
*/ */
class FlashHelperTest extends CakeTestCase { class FlashHelperTest extends CakeTestCase {
/**
* setupBeforeClass method
*
* @return void
*/
public static function setupBeforeClass() { public static function setupBeforeClass() {
App::build(array( App::build(array(
'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS) 'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS)
)); ));
} }
/** /**
* setUp method * setUp method
* *
* @return void * @return void
@ -76,7 +81,7 @@ class FlashHelperTest extends CakeTestCase {
)); ));
} }
/** /**
* tearDown method * tearDown method
* *
* @return void * @return void
@ -87,7 +92,7 @@ class FlashHelperTest extends CakeTestCase {
CakeSession::destroy(); CakeSession::destroy();
} }
/** /**
* testFlash method * testFlash method
* *
* @return void * @return void
@ -109,7 +114,7 @@ class FlashHelperTest extends CakeTestCase {
$this->assertNull($this->Flash->render('non-existent')); $this->assertNull($this->Flash->render('non-existent'));
} }
/** /**
* testFlashThrowsException * testFlashThrowsException
* *
* @expectedException UnexpectedValueException * @expectedException UnexpectedValueException
@ -119,7 +124,7 @@ class FlashHelperTest extends CakeTestCase {
$this->Flash->render('foo'); $this->Flash->render('foo');
} }
/** /**
* test setting the element from the attrs. * test setting the element from the attrs.
* *
* @return void * @return void
@ -135,7 +140,7 @@ class FlashHelperTest extends CakeTestCase {
$this->assertContains($expected, $result); $this->assertContains($expected, $result);
} }
/** /**
* test using elements in plugins. * test using elements in plugins.
* *
* @return void * @return void