From 28b7fb5653de2d8b941a5f489e40bca18be490d3 Mon Sep 17 00:00:00 2001 From: "mariano.iglesias" Date: Wed, 24 Oct 2007 16:07:36 +0000 Subject: [PATCH] Reenabling disabled tests git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5889 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/tests/cases/libs/model/model.test.php | 80 +++++++++++----------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/cake/tests/cases/libs/model/model.test.php b/cake/tests/cases/libs/model/model.test.php index d3e35aa44..ab3b3cb84 100644 --- a/cake/tests/cases/libs/model/model.test.php +++ b/cake/tests/cases/libs/model/model.test.php @@ -461,7 +461,7 @@ class ModelTest extends CakeTestCase { Configure::write('debug', $this->debug); } - function _testMultipleBelongsToWithSameClass() { + function testMultipleBelongsToWithSameClass() { $this->DeviceType =& new DeviceType(); $this->DeviceType->recursive = 2; @@ -497,7 +497,7 @@ class ModelTest extends CakeTestCase { unset($this->DeviceType); } - function _testHabtmRecursiveBelongsTo() { + function testHabtmRecursiveBelongsTo() { $this->Portfolio =& new Portfolio(); $result = $this->Portfolio->find(array('id' => 2), null, null, 3); @@ -517,7 +517,7 @@ class ModelTest extends CakeTestCase { unset($this->Portfolio); } - function _testHasManyOptimization() { + function testHasManyOptimization() { $this->Project =& new Project(); $this->Project->recursive = 3; @@ -539,7 +539,7 @@ class ModelTest extends CakeTestCase { unset($this->Project); } - function _testFindAllRecursiveSelfJoin() { + function testFindAllRecursiveSelfJoin() { $this->model =& new Home(); $this->model->recursive = 2; @@ -561,14 +561,14 @@ class ModelTest extends CakeTestCase { $this->assertEqual($result, $expected); } - function _testIdentity() { + function testIdentity() { $this->model =& new Test(); $result = $this->model->name; $expected = 'Test'; $this->assertEqual($result, $expected); } - function _testCreation() { + function testCreation() { $this->model =& new Test(); $result = $this->model->create(); $expected = array('Test' => array('notes' => 'write some notes here')); @@ -600,7 +600,7 @@ class ModelTest extends CakeTestCase { $this->assertEqual($result, $expected); } - function _testCreationWithMultipleData() { + function testCreationWithMultipleData() { $this->Article =& new Article(); $this->Comment =& new Comment(); @@ -667,7 +667,7 @@ class ModelTest extends CakeTestCase { array('Article' => array('id' => 4, 'title' => 'Brand New Article')))); } - function _testReadFakeThread() { + function testReadFakeThread() { $this->model =& new CategoryThread(); $this->db->fullDebug = true; @@ -685,7 +685,7 @@ class ModelTest extends CakeTestCase { $this->assertEqual($result, $expected); } - function _testFindFakeThread() { + function testFindFakeThread() { $this->model =& new CategoryThread(); $this->db->fullDebug = true; @@ -703,7 +703,7 @@ class ModelTest extends CakeTestCase { $this->assertEqual($result, $expected); } - function _testFindAllFakeThread() { + function testFindAllFakeThread() { $this->model =& new CategoryThread(); $this->db->fullDebug = true; @@ -743,7 +743,7 @@ class ModelTest extends CakeTestCase { $this->assertEqual($result, $expected); } - function _testFindAll() { + function testFindAll() { $this->model =& new User(); $result = $this->model->findAll(); @@ -827,7 +827,7 @@ class ModelTest extends CakeTestCase { $this->assertEqual($result, $expected); } - function _testGenerateList() { + function testGenerateList() { $this->model =& new Article(); $this->model->displayField = 'title'; @@ -863,7 +863,7 @@ class ModelTest extends CakeTestCase { $this->assertEqual($result, $expected); } - function _testFindField() { + function testFindField() { $this->model =& new User(); $this->model->id = 1; @@ -884,7 +884,7 @@ class ModelTest extends CakeTestCase { $this->assertEqual($result, 4); } - function _testUpdateExisting() { + function testUpdateExisting() { $this->model =& new User(); $this->model->id = $id = 1000; $this->model->delete(); @@ -907,7 +907,7 @@ class ModelTest extends CakeTestCase { $this->assertTrue($result); } - function _testBindUnbind() { + function testBindUnbind() { $this->model =& new User(); $result = $this->model->hasMany; @@ -1017,7 +1017,7 @@ class ModelTest extends CakeTestCase { $this->assertEqual($result, $expected); } - function _testFindCount() { + function testFindCount() { $this->model =& new User(); $result = $this->model->findCount(); $this->assertEqual($result, 4); @@ -1034,7 +1034,7 @@ class ModelTest extends CakeTestCase { $this->db->fullDebug = false; } - function _testFindMagic() { + function testFindMagic() { $this->model =& new User(); $result = $this->model->findByUser('mariano'); @@ -1046,7 +1046,7 @@ class ModelTest extends CakeTestCase { $this->assertEqual($result, $expected); } - function _testRead() { + function testRead() { $this->model =& new User(); $result = $this->model->read(); @@ -1082,7 +1082,7 @@ class ModelTest extends CakeTestCase { $this->assertEqual($result, $expected); } - function _testRecursiveRead() { + function testRecursiveRead() { $this->model =& new User(); $result = $this->model->bindModel(array('hasMany' => array('Article')), false); @@ -1116,7 +1116,7 @@ class ModelTest extends CakeTestCase { $this->assertEqual($result, $expected); } - function _testRecursiveFindAll() { + function testRecursiveFindAll() { $this->model =& new Article(); $result = $this->model->findAll(array('Article.user_id' => 1)); @@ -1301,7 +1301,7 @@ class ModelTest extends CakeTestCase { $this->assertEqual($result, $expected); } - function _testRecursiveFindAllWithLimit() { + function testRecursiveFindAllWithLimit() { $this->model =& new Article(); $this->model->hasMany['Comment']['limit'] = 2; @@ -1371,7 +1371,7 @@ class ModelTest extends CakeTestCase { $this->assertEqual($result, $expected); } - function _testAssociationAfterFind() { + function testAssociationAfterFind() { $this->model =& new Post(); $result = $this->model->findAll(); $expected = array( @@ -1389,7 +1389,7 @@ class ModelTest extends CakeTestCase { $this->assertEqual($result, $expected); } - function _testValidatesBackwards() { + function testValidatesBackwards() { $this->model =& new TestValidate(); $this->model->validate = array( @@ -1429,7 +1429,7 @@ class ModelTest extends CakeTestCase { $this->assertTrue($result); } - function _testValidates() { + function testValidates() { $this->model =& new TestValidate(); $this->model->validate = array( @@ -1639,7 +1639,7 @@ class ModelTest extends CakeTestCase { $this->assertTrue($result); } - function _testSaveField() { + function testSaveField() { $this->model =& new Article(); $this->model->id = 1; @@ -1677,7 +1677,7 @@ class ModelTest extends CakeTestCase { $this->assertFalse($result); } - function _testSaveWithCreate() { + function testSaveWithCreate() { $this->model =& new User(); $data = array('User' => array('user' => 'user', 'password' => '')); @@ -1790,7 +1790,7 @@ class ModelTest extends CakeTestCase { $this->assertEqual($result, $expected); } - function _testSaveWithSet() { + function testSaveWithSet() { $this->model =& new Article(); // Create record we will be updating later @@ -1892,7 +1892,7 @@ class ModelTest extends CakeTestCase { $this->assertEqual($result, $expected); } - function _testSaveHabtm() { + function testSaveHabtm() { $this->model =& new Article(); $result = $this->model->findById(2); @@ -2195,7 +2195,7 @@ class ModelTest extends CakeTestCase { $this->assertEqual($result, $expected); } - function _testDel() { + function testDel() { $this->model =& new Article(); $result = $this->model->del(2); @@ -2226,7 +2226,7 @@ class ModelTest extends CakeTestCase { $this->assertEqual($result, $expected); } - function _testDeleteAll() { + function testDeleteAll() { $this->model =& new Article(); // Add some more articles @@ -2282,7 +2282,7 @@ class ModelTest extends CakeTestCase { $this->assertEqual($result, $expected); } - function _testRecursiveDel() { + function testRecursiveDel() { $this->model =& new Article(); $result = $this->model->del(2); @@ -2311,7 +2311,7 @@ class ModelTest extends CakeTestCase { $this->assertEqual($result, 0); } - function _testFindAllThreaded() { + function testFindAllThreaded() { $this->model =& new Category(); $result = $this->model->findAllThreaded(); @@ -2395,7 +2395,7 @@ class ModelTest extends CakeTestCase { $this->assertEqual($result, $expected); } - function _testFindNeighbours() { + function testFindNeighbours() { $this->model =& new Article(); $result = $this->model->findNeighbours(null, 'Article.id', '2'); @@ -2414,7 +2414,7 @@ class ModelTest extends CakeTestCase { $this->assertEqual($result, $expected); } - function _testFindCombinedRelations() { + function testFindCombinedRelations() { $this->model =& new Apple(); $result = $this->model->findAll(); @@ -2460,14 +2460,14 @@ class ModelTest extends CakeTestCase { $this->assertEqual($result, $expected); } - function _testSaveEmpty() { + function testSaveEmpty() { $this->model =& new Article(); $data = array(); $expected = $this->model->save($data); $this->assertFalse($expected); } - /*function _testBasicValidation() { + /*function testBasicValidation() { $this->model =& new ValidationTest(); $this->model->set(array('title' => '', 'published' => 1)); $this->assertEqual($this->model->invalidFields(), array('title' => 'This field cannot be left blank')); @@ -2481,11 +2481,11 @@ class ModelTest extends CakeTestCase { $this->assertEqual($this->model->invalidFields(), array('body' => 'This field cannot be left blank')); }*/ - function _testMultipleValidation() { + function testMultipleValidation() { $this->model =& new ValidationTest(); } - function _testLoadModelSecondIteration (){ + function testLoadModelSecondIteration (){ $model = new ModelA(); $this->assertIsA($model,'ModelA'); @@ -2496,7 +2496,7 @@ class ModelTest extends CakeTestCase { $this->assertIsA($model->ModelC->ModelD, 'ModelD'); } - function _testRecursiveUnbind() { + function testRecursiveUnbind() { $this->model =& new Apple(); $this->model->recursive = 2; @@ -2797,7 +2797,7 @@ class ModelTest extends CakeTestCase { $this->assertEqual($result, $expected); } - function _testSelfAssociationAfterFind() { + function testSelfAssociationAfterFind() { $afterFindModel = new NodeAfterFind(); $afterFindModel->recursive = 3; $afterFindData = $afterFindModel->findAll();