Upgrade CakePHP from 2.2.5 to 2.9.5

This commit is contained in:
Brm Ko 2017-02-26 15:29:44 +01:00
parent 5a580df460
commit 235a541597
793 changed files with 60746 additions and 23753 deletions

View file

@ -4,26 +4,24 @@
*
* Test Case for ControllerTestCase class
*
* PHP version 5
*
* CakePHP : Rapid Development Framework (http://cakephp.org)
* Copyright 2005-2012, Cake Software Foundation, Inc.
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2005-2012, Cake Software Foundation, Inc.
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP Project
* @package Cake.Test.Case.Event
* @since CakePHP v 2.1
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
App::uses('CakeEvent', 'Event');
/**
* Tests the CakeEvent class functionality
*
*/
class CakeEventTest extends CakeTestCase {
@ -31,6 +29,7 @@ class CakeEventTest extends CakeTestCase {
* Tests the name() method
*
* @return void
* @triggers fake.event
*/
public function testName() {
$event = new CakeEvent('fake.event');
@ -41,6 +40,8 @@ class CakeEventTest extends CakeTestCase {
* Tests the subject() method
*
* @return void
* @triggers fake.event $this
* @triggers fake.event
*/
public function testSubject() {
$event = new CakeEvent('fake.event', $this);
@ -54,6 +55,7 @@ class CakeEventTest extends CakeTestCase {
* Tests the event propagation stopping property
*
* @return void
* @triggers fake.event
*/
public function testPropagation() {
$event = new CakeEvent('fake.event');
@ -66,6 +68,7 @@ class CakeEventTest extends CakeTestCase {
* Tests that it is possible to get/set custom data in a event
*
* @return void
* @triggers fake.event $this, array('some' => 'data')
*/
public function testEventData() {
$event = new CakeEvent('fake.event', $this, array('some' => 'data'));
@ -76,10 +79,11 @@ class CakeEventTest extends CakeTestCase {
* Tests that it is possible to get the name and subject directly
*
* @return void
* @triggers fake.event $this
*/
public function testEventDirectPropertyAccess() {
$event = new CakeEvent('fake.event', $this);
$this->assertEquals($this, $event->subject);
$this->assertEquals('fake.event', $event->name);
}
}
}