mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Merge branch '2.1' into 2.2
h origin especially if it merges an updated upstream into a topic branch.
This commit is contained in:
commit
7ef83b89f5
2 changed files with 10 additions and 16 deletions
|
@ -206,6 +206,10 @@ class SecurityComponent extends Component {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function startup(Controller $controller) {
|
public function startup(Controller $controller) {
|
||||||
|
if ($controller->name == 'CakeError') {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
$this->request = $controller->request;
|
$this->request = $controller->request;
|
||||||
$this->_action = $this->request->params['action'];
|
$this->_action = $this->request->params['action'];
|
||||||
$this->_methodsRequired($controller);
|
$this->_methodsRequired($controller);
|
||||||
|
|
|
@ -136,24 +136,14 @@ class CakeTestSuiteDispatcher {
|
||||||
* @return boolean true if found, false otherwise
|
* @return boolean true if found, false otherwise
|
||||||
*/
|
*/
|
||||||
public function loadTestFramework() {
|
public function loadTestFramework() {
|
||||||
$found = $path = null;
|
foreach (App::path('vendors') as $vendor) {
|
||||||
|
if (is_dir($vendor . 'PHPUnit')) {
|
||||||
if (@include 'PHPUnit' . DS . 'Autoload.php') {
|
ini_set('include_path', $vendor . PATH_SEPARATOR . ini_get('include_path'));
|
||||||
$found = true;
|
break;
|
||||||
}
|
|
||||||
|
|
||||||
if (!$found) {
|
|
||||||
foreach (App::path('vendors') as $vendor) {
|
|
||||||
if (is_dir($vendor . 'PHPUnit')) {
|
|
||||||
$path = $vendor;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($path && ini_set('include_path', $path . PATH_SEPARATOR . ini_get('include_path'))) {
|
|
||||||
$found = include 'PHPUnit' . DS . 'Autoload.php';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $found;
|
|
||||||
|
return include 'PHPUnit' . DS . 'Autoload.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue