Permalink
Browse files

Updated TestApp folder

  • Loading branch information...
jrbasso committed May 26, 2012
1 parent 9d0a9a9 commit 93c024b3ef1837e3a1142adf9e01d371cd8726f3
Showing with 1,488 additions and 51 deletions.
  1. +4 −1 lib/Cake/Test/TestApp/Cache/Engine/TestAppCacheEngine.php
  2. +1 −1 lib/Cake/Test/TestApp/Config/acl.ini.php
  3. +3 −1 lib/Cake/Test/TestApp/Config/routes.php
  4. +5 −1 lib/Cake/Test/TestApp/Console/Command/SampleShell.php
  5. +91 −0 lib/Cake/Test/TestApp/Controller/AjaxAuthController.php
  6. +2 −2 lib/Cake/Test/TestApp/Controller/AppController.php
  7. +143 −0 lib/Cake/Test/TestApp/Controller/AuthTestController.php
  8. +52 −0 lib/Cake/Test/TestApp/Controller/Component/AppleComponent.php
  9. +45 −0 lib/Cake/Test/TestApp/Controller/Component/BananaComponent.php
  10. +28 −0 lib/Cake/Test/TestApp/Controller/Component/MergeVarComponent.php
  11. +34 −0 lib/Cake/Test/TestApp/Controller/Component/MutuallyReferencingOneComponent.php
  12. +34 −0 lib/Cake/Test/TestApp/Controller/Component/MutuallyReferencingTwoComponent.php
  13. +55 −0 lib/Cake/Test/TestApp/Controller/Component/OrangeComponent.php
  14. +41 −0 lib/Cake/Test/TestApp/Controller/Component/ParamTestComponent.php
  15. +34 −0 lib/Cake/Test/TestApp/Controller/Component/SomethingWithCookieComponent.php
  16. +48 −0 lib/Cake/Test/TestApp/Controller/Component/TestAuthComponent.php
  17. +43 −0 lib/Cake/Test/TestApp/Controller/ComponentTestController.php
  18. +48 −0 lib/Cake/Test/TestApp/Controller/MergeVariablesController.php
  19. +41 −0 lib/Cake/Test/TestApp/Controller/MergeVarsAppController.php
  20. +43 −0 lib/Cake/Test/TestApp/Controller/OrangeSessionTestController.php
  21. +2 −2 lib/Cake/Test/TestApp/Controller/PagesController.php
  22. +111 −0 lib/Cake/Test/TestApp/Controller/RequestActionController.php
  23. +66 −0 lib/Cake/Test/TestApp/Controller/RequestHandlerTestController.php
  24. +43 −0 lib/Cake/Test/TestApp/Controller/SessionTestController.php
  25. +3 −1 lib/Cake/Test/TestApp/Controller/TestsAppsController.php
  26. +3 −1 lib/Cake/Test/TestApp/Controller/TestsAppsPostsController.php
  27. +3 −1 lib/Cake/Test/TestApp/Lib/Library.php
  28. +4 −3 lib/Cake/Test/TestApp/Log/Engine/TestAppLog.php
  29. +2 −2 lib/Cake/Test/TestApp/Model/AppModel.php
  30. +42 −0 lib/Cake/Test/TestApp/Model/AuthUser.php
  31. +2 −2 lib/Cake/Test/TestApp/Model/Behavior/PersisterOneBehaviorBehavior.php
  32. +2 −2 lib/Cake/Test/TestApp/Model/Behavior/PersisterTwoBehaviorBehavior.php
  33. +3 −1 lib/Cake/Test/TestApp/Model/Comment.php
  34. +59 −0 lib/Cake/Test/TestApp/Model/ControllerPaginateModel.php
  35. +59 −0 lib/Cake/Test/TestApp/Model/ControllerPaginatorModel.php
  36. +3 −1 lib/Cake/Test/TestApp/Model/Datasource/Database/TestLocalDriver.php
  37. +4 −4 lib/Cake/Test/TestApp/Model/Datasource/Session/TestAppLibSession.php
  38. +3 −0 lib/Cake/Test/TestApp/Model/Datasource/Test2OtherSource.php
  39. +3 −0 lib/Cake/Test/TestApp/Model/Datasource/Test2Source.php
  40. +58 −0 lib/Cake/Test/TestApp/Model/PaginatorAuthor.php
  41. +48 −0 lib/Cake/Test/TestApp/Model/PaginatorControllerComment.php
  42. +89 −0 lib/Cake/Test/TestApp/Model/PaginatorControllerPost.php
  43. +3 −1 lib/Cake/Test/TestApp/Model/PersisterOne.php
  44. +5 −6 lib/Cake/Test/TestApp/Model/PersisterTwo.php
  45. +3 −1 lib/Cake/Test/TestApp/Model/Post.php
  46. +42 −0 lib/Cake/Test/TestApp/Model/RequestActionPost.php
  47. +2 −0 lib/Cake/Test/TestApp/Utility/TestAppEngine.php
  48. +4 −1 lib/Cake/Test/TestApp/Utility/TestUtilityClass.php
  49. +1 −1 lib/Cake/Test/TestApp/Vendor/Test/MyTest.php
  50. +1 −1 lib/Cake/Test/TestApp/Vendor/Test/hello.php
  51. +1 −1 lib/Cake/Test/TestApp/Vendor/sample/configure_test_vendor_sample.php
  52. +1 −1 lib/Cake/Test/TestApp/Vendor/somename/some.name.php
  53. +1 −1 lib/Cake/Test/TestApp/Vendor/welcome.php
  54. 0 lib/Cake/Test/TestApp/{Controller/Component → View/Errors}/empty
  55. +1 −0 lib/Cake/Test/TestApp/View/Errors/error400.ctp
  56. +1 −0 lib/Cake/Test/TestApp/View/Errors/error500.ctp
  57. +3 −3 lib/Cake/Test/TestApp/View/Helper/BananaHelper.php
  58. +2 −2 lib/Cake/Test/TestApp/View/Layouts/flash.ctp
  59. +5 −3 lib/Cake/Test/TestApp/View/Pages/home.ctp
  60. +1 −1 lib/Cake/Test/TestApp/View/Posts/json/index.ctp
  61. +3 −1 lib/Cake/Test/TestApp/View/Posts/test_nocache_tags.ctp
  62. +1 −1 lib/Cake/Test/TestApp/View/Posts/xml/index.ctp
@@ -12,10 +12,13 @@
*
* @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests
* @package Cake.Test.test_app.Lib.Cache.Engine
* @package Cake.Test.TestApp.Lib.Cache.Engine
* @since CakePHP(tm) v 1.3
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
namespace TestApp\Cache\Engine;
use Cake\Cache\CacheEngine;
class TestAppCacheEngine extends CacheEngine {
public function write($key, $value, $duration) {
@@ -14,7 +14,7 @@
; *
; * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
; * @link http://cakephp.org CakePHP(tm) Project
;; * @package Cake.Test.test_app.Config
;; * @package Cake.Test.TestApp.Config
; * @since CakePHP(tm) v 0.10.0.1076
; * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
; */
@@ -14,10 +14,12 @@
*
* @copyright Copyright 2005-2012, Cake Software Foundation, Inc.
* @link http://cakephp.org CakePHP Project
* @package Cake.Test.test_app.Config
* @package Cake.Test.TestApp.Config
* @since CakePHP v 2.0
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
namespace TestApp\Config;
use Cake\Routing\Router;
Router::parseExtensions('json');
Router::connect('/some_alias', array('controller' => 'tests_apps', 'action' => 'some_method'));
@@ -12,10 +12,14 @@
*
* @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests
* @package Cake.Test.test_app.Console.Command
* @package Cake.Test.TestApp.Console.Command
* @since CakePHP(tm) v 1.2.0.7871
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
namespace TestApp\Console\Command;
use Cake\Console\Shell;
class SampleShell extends Shell {
/**
@@ -0,0 +1,91 @@
<?php
/**
* AjaxAuthController
*
* PHP 5
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package Cake.Controller
* @since CakePHP(tm) v 3.0.0
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
namespace TestApp\Controller;
use Cake\Controller\Controller;
/**
* AjaxAuthController class
*
* @package Cake.Test.Case.Controller.Component
*/
class AjaxAuthController extends Controller {
/**
* name property
*
* @var string 'AjaxAuth'
*/
public $name = 'AjaxAuth';
/**
* components property
*
* @var array
*/
public $components = array('Session', 'TestAuth');
/**
* uses property
*
* @var array
*/
public $uses = array();
/**
* testUrl property
*
* @var mixed null
*/
public $testUrl = null;
/**
* beforeFilter method
*
* @return void
*/
public function beforeFilter() {
$this->TestAuth->ajaxLogin = 'test_element';
$this->TestAuth->userModel = 'AuthUser';
$this->TestAuth->RequestHandler->ajaxLayout = 'ajax2';
}
/**
* add method
*
* @return void
*/
public function add() {
if ($this->TestAuth->testStop !== true) {
echo 'Added Record';
}
}
/**
* redirect method
*
* @param mixed $url
* @param mixed $status
* @param mixed $exit
* @return void
*/
public function redirect($url, $status = null, $exit = true) {
$this->testUrl = Router::url($url);
return false;
}
}
@@ -19,8 +19,8 @@
* @since CakePHP(tm) v 0.2.9
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
App::uses('Controller', 'Controller');
namespace TestApp\Controller;
use Cake\Controller\Controller;
/**
* This is a placeholder class.
@@ -0,0 +1,143 @@
<?php
/**
* AuthTestController
*
* PHP 5
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package Cake.Controller
* @since CakePHP(tm) v 3.0.0
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
namespace TestApp\Controller;
use Cake\Controller\Controller,
Cake\Routing\Router;
/**
* AuthTestController class
*
*/
class AuthTestController extends Controller {
/**
* name property
*
* @var string 'AuthTest'
*/
public $name = 'AuthTest';
/**
* uses property
*
* @var array
*/
public $uses = array('AuthUser');
/**
* components property
*
* @var array
*/
public $components = array('Session', 'Auth');
/**
* testUrl property
*
* @var mixed null
*/
public $testUrl = null;
/**
* construct method
*
* @return void
*/
function __construct($request, $response) {
$request->addParams(Router::parse('/auth_test'));
$request->here = '/auth_test';
$request->webroot = '/';
Router::setRequestInfo($request);
parent::__construct($request, $response);
}
/**
* login method
*
* @return void
*/
public function login() {
}
/**
* admin_login method
*
* @return void
*/
public function admin_login() {
}
/**
* admin_add method
*
* @return void
*/
public function admin_add() {
}
/**
* logout method
*
* @return void
*/
public function logout() {
}
/**
* add method
*
* @return void
*/
public function add() {
echo "add";
}
/**
* add method
*
* @return void
*/
public function camelCase() {
echo "camelCase";
}
/**
* redirect method
*
* @param mixed $url
* @param mixed $status
* @param mixed $exit
* @return void
*/
public function redirect($url, $status = null, $exit = true) {
$this->testUrl = Router::url($url);
return false;
}
/**
* isAuthorized method
*
* @return void
*/
public function isAuthorized() {
}
}
@@ -0,0 +1,52 @@
<?php
/**
* AppleComponent
*
* PHP 5
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package Cake.Controller
* @since CakePHP(tm) v 3.0.0
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
namespace TestApp\Controller\Component;
use Cake\Controller\Component;
/**
* AppleComponent class
*
* @package Cake.Test.Case.Controller
*/
class AppleComponent extends Component {
/**
* components property
*
* @var array
*/
public $components = array('Orange');
/**
* testName property
*
* @var mixed null
*/
public $testName = null;
/**
* startup method
*
* @param mixed $controller
* @return void
*/
public function startup($controller) {
$this->testName = $controller->name;
}
}
@@ -0,0 +1,45 @@
<?php
/**
* BananaComponent
*
* PHP 5
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package Cake.Controller
* @since CakePHP(tm) v 3.0.0
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
namespace TestApp\Controller\Component;
use Cake\Controller\Component;
/**
* BananaComponent class
*
* @package Cake.Test.Case.Controller
*/
class BananaComponent extends Component {
/**
* testField property
*
* @var string 'BananaField'
*/
public $testField = 'BananaField';
/**
* startup method
*
* @param Controller $controller
* @return string
*/
public function startup($controller) {
$controller->bar = 'fail';
}
}
Oops, something went wrong.

0 comments on commit 93c024b

Please sign in to comment.