Permalink
Browse files

Tidy up doc blocks and use proper mocks.

  • Loading branch information...
markstory committed Jul 4, 2013
1 parent f54de03 commit a0ce6830eee34b979ad1604707589ca46695c558
View
@@ -1,7 +1,5 @@
<?php
/**
* PHP 5
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
@@ -11,7 +9,6 @@
*
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package Cake.Observer
* @since CakePHP(tm) v 2.1
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
@@ -1,20 +1,16 @@
<?php
/**
*
* PHP 5
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* 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 (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package Cake.Event
* @since CakePHP(tm) v 2.1
* @license http://www.opensource.org/licenses/mit-license.php MIT License
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @since CakePHP(tm) v 2.1
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
namespace Cake\Event;
@@ -25,8 +21,6 @@
* data to them, and firing them in the correct order, when associated events are triggered. You
* can create multiple instances of this object to manage local events or keep a single instance
* and pass it around to manage all events in your app.
*
* @package Cake.Event
*/
class EventManager {
@@ -1,7 +1,5 @@
<?php
/**
* PHP 5
*
* CakePHP : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
@@ -11,7 +9,6 @@
*
* @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 http://www.opensource.org/licenses/mit-license.php MIT License
*/
@@ -24,8 +21,6 @@
/**
* Mock class used to test event dispatching
*
* @package Cake.Test.TestCase.Event
*/
class EventTestListener {
@@ -63,8 +58,6 @@ public function stopListener($event) {
/**
* Mock used for testing the subscriber objects
*
* @package Cake.Test.TestCase.Event
*/
class CustomTestEventListerner extends EventTestListener implements EventListener {
@@ -95,7 +88,6 @@ public function thirdListenerFunction() {
*
*/
class EventManagerTest extends TestCase {
/**
* Tests the attach() method for a single event key in multiple queues
*
@@ -1,11 +1,5 @@
<?php
/**
* ControllerTestCaseTest file
*
* Test Case for ControllerTestCase class
*
* PHP 5
*
* CakePHP : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
@@ -15,7 +9,6 @@
*
* @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 http://www.opensource.org/licenses/mit-license.php MIT License
*/
@@ -547,7 +547,8 @@ public function testAfterRenderConditions() {
->with('posts/index', 'content')
->will($this->returnValue(''));
$Cache->afterRenderFile(null, 'posts/index', 'content');
$event = $this->getMock('Cake\Event\Event');
$Cache->afterRenderFile($event, 'posts/index', 'content');
}
/**
@@ -567,14 +568,15 @@ public function testAfterLayoutConditions() {
->with('posts/index', $View->fetch('content'))
->will($this->returnValue(''));
$Cache->afterLayout(null, 'posts/index');
$event = $this->getMock('Cake\Event\Event');
$Cache->afterLayout($event, 'posts/index');
Configure::write('Cache.check', false);
$Cache->afterLayout(null, 'posts/index');
$Cache->afterLayout($event, 'posts/index');
Configure::write('Cache.check', true);
$View->cacheAction = false;
$Cache->afterLayout(null, 'posts/index');
$Cache->afterLayout($event, 'posts/index');
}
/**

0 comments on commit a0ce683

Please sign in to comment.