mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fix for phpcs
This commit is contained in:
parent
b8b6b67abd
commit
e173c29d33
3 changed files with 69 additions and 64 deletions
|
@ -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,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'));
|
||||
|
||||
|
|
|
@ -23,19 +23,24 @@ 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
|
||||
|
@ -76,7 +81,7 @@ class FlashHelperTest extends CakeTestCase {
|
|||
));
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* tearDown method
|
||||
*
|
||||
* @return void
|
||||
|
@ -87,7 +92,7 @@ class FlashHelperTest extends CakeTestCase {
|
|||
CakeSession::destroy();
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* testFlash method
|
||||
*
|
||||
* @return void
|
||||
|
@ -109,7 +114,7 @@ class FlashHelperTest extends CakeTestCase {
|
|||
$this->assertNull($this->Flash->render('non-existent'));
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* testFlashThrowsException
|
||||
*
|
||||
* @expectedException UnexpectedValueException
|
||||
|
@ -119,7 +124,7 @@ class FlashHelperTest extends CakeTestCase {
|
|||
$this->Flash->render('foo');
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* test setting the element from the attrs.
|
||||
*
|
||||
* @return void
|
||||
|
@ -135,7 +140,7 @@ class FlashHelperTest extends CakeTestCase {
|
|||
$this->assertContains($expected, $result);
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* test using elements in plugins.
|
||||
*
|
||||
* @return void
|
||||
|
|
Loading…
Reference in a new issue