Browse Source

Fix estrict issues

euromark 12 years ago
parent
commit
b38766ccea

+ 1 - 1
Model/Datasource/ImapSource.php

@@ -305,7 +305,7 @@ class ImapSource extends DataSource {
 	 *
 	 * @return array Sources
 	 */
-	public function listSources() {
+	public function listSources($data = null) {
 		return array('listSources');
 	}
 

+ 1 - 0
Test/Case/Controller/Component/Auth/DirectAuthenticateTest.php

@@ -31,6 +31,7 @@ class DirectAuthenticateTest extends CakeTestCase {
 			'userModel' => 'User'
 		));
 		$User = ClassRegistry::init('User');
+		$User->belongsTo = array();
 		$this->response = $this->getMock('CakeResponse');
 	}
 

+ 2 - 2
Test/Case/Model/SubqueryTest.php

@@ -14,7 +14,7 @@ class SubqueryTest extends MyCakeTestCase {
 	public $Model;
 
 	public function setUp() {
-		$this->Model = ClassRegistry::init('Tools.Country');
+		$this->Model = ClassRegistry::init('Country');
 
 		parent::setUp();
 	}
@@ -86,6 +86,6 @@ class SubqueryTest extends MyCakeTestCase {
 
 class CountriesTestsController extends Controller {
 
-	public $uses = array('Tools.Country');
+	public $uses = array('Country');
 
 }

+ 0 - 55
Test/Fixture/CityFixture.php

@@ -1,55 +0,0 @@
-<?php
-/* City Fixture generated on: 2011-11-20 21:58:46 : 1321822726 */
-
-/**
- * CityFixture
- *
- */
-class CityFixture extends CakeTestFixture {
-
-	/**
-	 * Fields
-	 *
-	 * @var array
-	 */
-	public $fields = array(
-		'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary', 'collate' => null, 'comment' => ''),
-		'name' => array('type' => 'string', 'null' => false, 'default' => null, 'length' => 30, 'collate' => 'utf8_unicode_ci', 'comment' => '', 'charset' => 'utf8'),
-		'slug' => array('type' => 'string', 'null' => false, 'default' => null, 'length' => 40, 'collate' => 'utf8_unicode_ci', 'comment' => '', 'charset' => 'utf8'),
-		'lat' => array('type' => 'float', 'null' => false, 'default' => '0.000000', 'length' => '10,6', 'collate' => null, 'comment' => ''),
-		'lng' => array('type' => 'float', 'null' => false, 'default' => '0.000000', 'length' => '10,6', 'collate' => null, 'comment' => ''),
-		'active' => array('type' => 'boolean', 'null' => false, 'default' => '0', 'collate' => null, 'comment' => ''),
-		'created' => array('type' => 'datetime', 'null' => false, 'default' => null, 'collate' => null, 'comment' => ''),
-		'modified' => array('type' => 'datetime', 'null' => false, 'default' => null, 'collate' => null, 'comment' => ''),
-		'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)),
-		'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_unicode_ci', 'engine' => 'MyISAM')
-	);
-
-	/**
-	 * Records
-	 *
-	 * @var array
-	 */
-	public $records = array(
-		array(
-			'id' => '1',
-			'name' => 'München',
-			'slug' => 'muenchen',
-			'lat' => '48.139126',
-			'lng' => '11.580186',
-			'active' => 1,
-			'created' => '0000-00-00 00:00:00',
-			'modified' => '0000-00-00 00:00:00'
-		),
-		array(
-			'id' => '3',
-			'name' => 'Stuttgart',
-			'slug' => 'Stuttgart',
-			'lat' => '48.777107',
-			'lng' => '9.180769',
-			'active' => 1,
-			'created' => '2011-10-07 16:48:05',
-			'modified' => '0000-00-00 00:00:00'
-		),
-	);
-}

+ 0 - 30
Test/Fixture/ContinentFixture.php

@@ -1,30 +0,0 @@
-<?php
-/* Continent Fixture generated on: 2011-07-15 19:07:38 : 1310752058 */
-class ContinentFixture extends CakeTestFixture {
-
-	public $fields = array(
-		'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'),
-		'name' => array('type' => 'string', 'null' => false, 'default' => null, 'length' => 64, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'),
-		'ori_name' => array('type' => 'string', 'null' => false, 'default' => null, 'length' => 64, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'),
-		'parent_id' => array('type' => 'integer', 'null' => false, 'default' => '0', 'length' => 10),
-		'lft' => array('type' => 'integer', 'null' => false, 'default' => '0', 'length' => 10),
-		'rgt' => array('type' => 'integer', 'null' => false, 'default' => '0', 'length' => 10),
-		'status' => array('type' => 'integer', 'null' => false, 'default' => '0', 'length' => 2),
-		'modified' => array('type' => 'datetime', 'null' => false, 'default' => null),
-		'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)),
-		'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_unicode_ci', 'engine' => 'MyISAM')
-	);
-
-	public $records = array(
-		array(
-			'id' => 1,
-			'name' => 'Lorem ipsum dolor sit amet',
-			'ori_name' => 'Lorem ipsum dolor sit amet',
-			'parent_id' => 1,
-			'lft' => 1,
-			'rgt' => 1,
-			'status' => 1,
-			'modified' => '2011-07-15 19:47:38'
-		),
-	);
-}

+ 0 - 36
Test/Fixture/SmileyFixture.php

@@ -1,36 +0,0 @@
-<?php
-
-class SmileyFixture extends CakeTestFixture {
-
-	public $fields = array(
-		'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'),
-		'smiley_cat_id' => array('type' => 'integer', 'null' => false, 'default' => '0', 'length' => 10),
-		'smiley_path' => array('type' => 'string', 'null' => false),
-		'title' => array('type' => 'string', 'null' => false, 'default' => null, 'length' => 32),
-		'prim_code' => array('type' => 'string', 'null' => false, 'default' => null, 'length' => 15),
-		'sec_code' => array('type' => 'string', 'null' => false, 'default' => null, 'length' => 15),
-		'is_base' => array('type' => 'boolean', 'null' => false, 'default' => '0'),
-		'sort' => array('type' => 'integer', 'null' => false, 'default' => '0', 'length' => 10),
-		'active' => array('type' => 'boolean', 'null' => false, 'default' => '0'),
-		'created' => array('type' => 'datetime', 'null' => false, 'default' => null),
-		'modified' => array('type' => 'datetime', 'null' => false, 'default' => null),
-		'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)),
-		'tableParameters' => array()
-	);
-
-	public $records = array(
-		array(
-			'id' => 1,
-			'smiley_cat_id' => 1,
-			'smiley_path' => 'Lorem ipsum dolor sit amet',
-			'title' => 'Lorem ipsum dolor sit amet',
-			'prim_code' => 'Lorem ipsum d',
-			'sec_code' => 'Lorem ipsum d',
-			'is_base' => 1,
-			'sort' => 1,
-			'active' => 1,
-			'created' => '2010-06-02 01:33:59',
-			'modified' => '2010-06-02 01:33:59'
-		),
-	);
-}

+ 2 - 1
TestSuite/MyCakeTestCase.php

@@ -72,7 +72,8 @@ abstract class MyCakeTestCase extends CakeTestCase {
 		}
 		$url = array_shift($pieces);
 		if ($full) {
-			$protocol = array_shift(explode('/', $_SERVER['SERVER_PROTOCOL'], 2));
+			$pieces = explode('/', $_SERVER['SERVER_PROTOCOL'], 2);
+			$protocol = array_shift($pieces);
 			$url = strtolower($protocol) . '://' . $_SERVER['SERVER_NAME'] . $url;
 		}
 		return $url;