Fix more strict errors.

This commit is contained in:
mark_story 2011-11-12 21:40:51 -05:00
parent 17ffcde505
commit a7fcb0a61c
4 changed files with 14 additions and 11 deletions

View file

@ -666,7 +666,7 @@ class App {
* @param boolean $return whether this function should return the contents of the file after being parsed by php or just a success notice
* @return mixed if $return contents of the file after php parses it, boolean indicating success otherwise
*/
protected function _loadFile($name, $plugin, $search, $file, $return) {
protected static function _loadFile($name, $plugin, $search, $file, $return) {
$mapped = self::_mapped($name, $plugin);
if ($mapped) {
$file = $mapped;

View file

@ -490,7 +490,7 @@ class ObjectTest extends CakeTestCase {
App::build(array(
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
), true);
CakePlugin::loadAll();
CakePlugin::load('TestPlugin');
Router::reload();
$result = $this->object->requestAction('/test_plugin/tests/index', array('return'));

View file

@ -300,11 +300,14 @@ class CakeResponseTest extends CakeTestCase {
}
/**
* Tests the compress method
*
*/
* Tests the compress method
*
* @return void
*/
public function testCompress() {
$this->skipIf(php_sapi_name() !== 'cli', 'The response compression can only be tested in cli.');
if (php_sapi_name() !== 'cli') {
$this->markTestSkipped('The response compression can only be tested in cli.');
}
$response = new CakeResponse();
if (ini_get("zlib.output_compression") === '1' || !extension_loaded("zlib")) {

View file

@ -7,23 +7,23 @@ class TestSource extends DataSource {
return compact('model');
}
public function listSources() {
public function listSources($data = null) {
return array('test_source');
}
public function create($model, $fields = array(), $values = array()) {
public function create(Model $model, $fields = array(), $values = array()) {
return compact('model', 'fields', 'values');
}
public function read($model, $queryData = array()) {
public function read(Model $model, $queryData = array()) {
return compact('model', 'queryData');
}
public function update($model, $fields = array(), $values = array()) {
public function update(Model $model, $fields = array(), $values = array()) {
return compact('model', 'fields', 'values');
}
public function delete($model, $id) {
public function delete(Model $model, $id = null) {
return compact('model', 'id');
}
}