Removed extra slash in test paths.

Removed extra lines in files.
Corrected header in file

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5340 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
phpnut 2007-06-23 05:56:36 +00:00
parent 4a9748e7f5
commit 90299c0d0e
4 changed files with 36 additions and 39 deletions

View file

@ -983,14 +983,14 @@ class DboSourceTest extends UnitTestCase {
$this->assertPattern('/\s+FROM\s+`test_model5` AS `TestModel5`\s+WHERE\s+/', $result);
$this->assertPattern('/\s+WHERE\s+(?:\()?`TestModel5`.`name`\s+!=\s+\'mariano\'(?:\))?\s*$/', $result);
}
function testGenerateAssociationQueryHasManyWithOffsetAndLimit() {
$this->model = new TestModel5();
$this->model->loadInfo();
$this->_buildRelatedModels($this->model);
$__backup = $this->model->hasMany['TestModel6'];
$this->model->hasMany['TestModel6']['offset'] = 2;
$this->model->hasMany['TestModel6']['limit'] = 5;
@ -1006,22 +1006,22 @@ class DboSourceTest extends UnitTestCase {
$this->assertPattern('/\s+FROM\s+`test_model6` AS `TestModel6`\s+WHERE\s+/', $result);
$this->assertPattern('/WHERE\s+(?:\()?`TestModel6`\.`test_model5_id`\s+IN\s+\({\$__cakeID__\$}\)(?:\))?/', $result);
$this->assertPattern('/\s+LIMIT 2,\s*5\s*$/', $result);
$result = $this->db->generateAssociationQuery($this->model, $null, null, null, null, $queryData, false, $null);
$this->assertPattern('/^SELECT\s+`TestModel5`\.`id`, `TestModel5`\.`test_model4_id`, `TestModel5`\.`name`, `TestModel5`\.`created`, `TestModel5`\.`updated`\s+/', $result);
$this->assertPattern('/\s+FROM\s+`test_model5` AS `TestModel5`\s+WHERE\s+/', $result);
$this->assertPattern('/\s+WHERE\s+(?:\()?1\s+=\s+1(?:\))?\s*$/', $result);
$this->model->hasMany['TestModel6'] = $__backup;
}
function testGenerateAssociationQueryHasManyWithPageAndLimit() {
$this->model = new TestModel5();
$this->model->loadInfo();
$this->_buildRelatedModels($this->model);
$__backup = $this->model->hasMany['TestModel6'];
$this->model->hasMany['TestModel6']['page'] = 2;
$this->model->hasMany['TestModel6']['limit'] = 5;
@ -1037,12 +1037,12 @@ class DboSourceTest extends UnitTestCase {
$this->assertPattern('/\s+FROM\s+`test_model6` AS `TestModel6`\s+WHERE\s+/', $result);
$this->assertPattern('/WHERE\s+(?:\()?`TestModel6`\.`test_model5_id`\s+IN\s+\({\$__cakeID__\$}\)(?:\))?/', $result);
$this->assertPattern('/\s+LIMIT 5,\s*5\s*$/', $result);
$result = $this->db->generateAssociationQuery($this->model, $null, null, null, null, $queryData, false, $null);
$this->assertPattern('/^SELECT\s+`TestModel5`\.`id`, `TestModel5`\.`test_model4_id`, `TestModel5`\.`name`, `TestModel5`\.`created`, `TestModel5`\.`updated`\s+/', $result);
$this->assertPattern('/\s+FROM\s+`test_model5` AS `TestModel5`\s+WHERE\s+/', $result);
$this->assertPattern('/\s+WHERE\s+(?:\()?1\s+=\s+1(?:\))?\s*$/', $result);
$this->model->hasMany['TestModel6'] = $__backup;
}
@ -1213,17 +1213,17 @@ class DboSourceTest extends UnitTestCase {
$this->assertPattern('/^SELECT\s+`TestModel4`\.`id`, `TestModel4`\.`name`, `TestModel4`\.`created`, `TestModel4`\.`updated`\s+/', $result);
$this->assertPattern('/\s+FROM\s+`test_model4` AS `TestModel4`\s+WHERE\s+(?:\()?`TestModel4`.`name`\s+!=\s+\'mariano\'(?:\))?\s*$/', $result);
}
function testGenerateAssociationQueryHasAndBelongsToManyWithOffsetAndLimit() {
$this->model = new TestModel4();
$this->model->loadInfo();
$this->_buildRelatedModels($this->model);
$__backup = $this->model->hasAndBelongsToMany['TestModel7'];
$this->model->hasAndBelongsToMany['TestModel7']['offset'] = 2;
$this->model->hasAndBelongsToMany['TestModel7']['limit'] = 5;
$binding = array('type'=>'hasAndBelongsToMany', 'model'=>'TestModel7');
$queryData = array();
$resultSet = null;
@ -1232,30 +1232,30 @@ class DboSourceTest extends UnitTestCase {
$params = &$this->_prepareAssociationQuery($this->model, $queryData, $binding);
$result = $this->db->generateAssociationQuery($this->model, $params['linkModel'], $params['type'], $params['assoc'], $params['assocData'], $queryData, $params['external'], $resultSet);
$this->assertPattern('/^SELECT\s+`TestModel7`\.`id`, `TestModel7`\.`name`, `TestModel7`\.`created`, `TestModel7`\.`updated`\s+/', $result);
$this->assertPattern('/\s+FROM\s+`test_model7` AS `TestModel7`\s+JOIN\s+`test_model4_test_model7`+/', $result);
$this->assertPattern('/\s+ON\s+(?:\()?`test_model4_test_model7`\.`test_model4_id`\s+=\s+{\$__cakeID__\$}(?:\))?/', $result);
$this->assertPattern('/\s+AND\s+(?:\()?`test_model4_test_model7`\.`test_model7_id`\s+=\s+`TestModel7`.`id`(?:\))?\s+WHERE\s+/', $result);
$this->assertPattern('/\s+(?:\()?1\s+=\s+1(?:\))?\s*\s+LIMIT 2,\s*5\s*$/', $result);
$result = $this->db->generateAssociationQuery($this->model, $null, null, null, null, $queryData, false, $null);
$this->assertPattern('/^SELECT\s+`TestModel4`\.`id`, `TestModel4`\.`name`, `TestModel4`\.`created`, `TestModel4`\.`updated`\s+/', $result);
$this->assertPattern('/\s+FROM\s+`test_model4` AS `TestModel4`\s+WHERE\s+(?:\()?1\s+=\s+1(?:\))?\s*$/', $result);
$this->model->hasAndBelongsToMany['TestModel7'] = $__backup;
}
function testGenerateAssociationQueryHasAndBelongsToManyWithPageAndLimit() {
$this->model = new TestModel4();
$this->model->loadInfo();
$this->_buildRelatedModels($this->model);
$__backup = $this->model->hasAndBelongsToMany['TestModel7'];
$this->model->hasAndBelongsToMany['TestModel7']['page'] = 2;
$this->model->hasAndBelongsToMany['TestModel7']['limit'] = 5;
$binding = array('type'=>'hasAndBelongsToMany', 'model'=>'TestModel7');
$queryData = array();
$resultSet = null;
@ -1264,17 +1264,17 @@ class DboSourceTest extends UnitTestCase {
$params = &$this->_prepareAssociationQuery($this->model, $queryData, $binding);
$result = $this->db->generateAssociationQuery($this->model, $params['linkModel'], $params['type'], $params['assoc'], $params['assocData'], $queryData, $params['external'], $resultSet);
$this->assertPattern('/^SELECT\s+`TestModel7`\.`id`, `TestModel7`\.`name`, `TestModel7`\.`created`, `TestModel7`\.`updated`\s+/', $result);
$this->assertPattern('/\s+FROM\s+`test_model7` AS `TestModel7`\s+JOIN\s+`test_model4_test_model7`+/', $result);
$this->assertPattern('/\s+ON\s+(?:\()?`test_model4_test_model7`\.`test_model4_id`\s+=\s+{\$__cakeID__\$}(?:\))?/', $result);
$this->assertPattern('/\s+AND\s+(?:\()?`test_model4_test_model7`\.`test_model7_id`\s+=\s+`TestModel7`.`id`(?:\))?\s+WHERE\s+/', $result);
$this->assertPattern('/\s+(?:\()?1\s+=\s+1(?:\))?\s*\s+LIMIT 5,\s*5\s*$/', $result);
$result = $this->db->generateAssociationQuery($this->model, $null, null, null, null, $queryData, false, $null);
$this->assertPattern('/^SELECT\s+`TestModel4`\.`id`, `TestModel4`\.`name`, `TestModel4`\.`created`, `TestModel4`\.`updated`\s+/', $result);
$this->assertPattern('/\s+FROM\s+`test_model4` AS `TestModel4`\s+WHERE\s+(?:\()?1\s+=\s+1(?:\))?\s*$/', $result);
$this->model->hasAndBelongsToMany['TestModel7'] = $__backup;
}
@ -1603,7 +1603,6 @@ class DboSourceTest extends UnitTestCase {
$expected = " WHERE `TestModel`.`field` = 'gribe$@()lu'";
$this->assertEqual($result, $expected);
$conditions['NOT'] = array('Listing.expiration' => "BETWEEN 1 AND 100");
$conditions[0]['OR'] = array(
"Listing.title" => "LIKE %term%",

View file

@ -1,6 +1,5 @@
<?php
/* SVN FILE: $Id$ */
/**
* Tree behavior class.
*
@ -8,24 +7,24 @@
*
* PHP versions 4 and 5
*
* CakePHP : Rapid Development Framework <http://www.cakephp.org/>
* Copyright (c) 2006, Cake Software Foundation, Inc.
* CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite>
* Copyright 2005-2007, Cake Software Foundation, Inc.
* 1785 E. Sahara Avenue, Suite 490-204
* Las Vegas, Nevada 89104
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
* Licensed under The Open Group Test Suite License
* Redistributions of files must retain the above copyright notice.
*
* @filesource
* @copyright Copyright (c) 2006, Cake Software Foundation, Inc.
* @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
* @package cake
* @copyright Copyright 2005-2007, Cake Software Foundation, Inc.
* @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests
* @package cake.tests
* @subpackage cake.tests.fixtures
* @since CakePHP v 1.2.0.4487
* @since CakePHP(tm) v 1.2.0.5331
* @version $Revision$
* @modifiedby $LastChangedBy$
* @lastmodified $Date$
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
* @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License
*/
/**
* Number Tree Test Fixture
@ -44,4 +43,4 @@ class NumberTreeFixture extends CakeTestFixture {
'lft' => array ('type' => 'integer','null' => false),
'rght' => array ('type' => 'integer','null' => false));
}
?>
?>

View file

@ -49,5 +49,4 @@ class PostFixture extends CakeTestFixture {
array ('id' => 3, 'author_id' => 1, 'title' => 'Third Post', 'body' => 'Third Post Body', 'published' => 'Y', 'created' => '2007-03-18 10:43:23', 'updated' => '2007-03-18 10:45:31')
);
}
?>

View file

@ -58,9 +58,9 @@ class TestManager {
$manager =& new TestManager();
if (!empty($manager->usersAppTest)) {
$testCasePath = APP_TEST_CASES . DIRECTORY_SEPARATOR;
$testCasePath = APP_TEST_CASES;
} else {
$testCasePath = CORE_TEST_CASES . DIRECTORY_SEPARATOR;
$testCasePath = CORE_TEST_CASES;
}
$testCases =& $manager->_getTestFileList($testCasePath);
$test =& new GroupTest('All Core Tests');