Added tests for issue #2391

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4843 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
mariano.iglesias 2007-04-11 21:27:16 +00:00
parent 4c7febfafa
commit cf2abbed03

View file

@ -229,14 +229,14 @@ class ModelTest extends CakeTestCase {
Configure::write('debug', DEBUG);
}
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'));
@ -259,7 +259,7 @@ class ModelTest extends CakeTestCase {
$this->assertEqual($result, $expected);
}
function _testFindAllFakeThread() {
function testFindAllFakeThread() {
$this->model =& new CategoryThread();
$this->db->fullDebug = true;
@ -276,7 +276,7 @@ class ModelTest extends CakeTestCase {
$this->assertEqual($result, $expected);
}
function _testFindAll() {
function testFindAll() {
$this->model =& new User();
$result = $this->model->findAll();
@ -370,7 +370,7 @@ class ModelTest extends CakeTestCase {
$this->assertEqual($result, $expected);
}
function _testFindField() {
function testFindField() {
$this->model =& new User();
$this->model->id = 1;
@ -391,7 +391,7 @@ class ModelTest extends CakeTestCase {
$this->assertEqual($result, 4);
}
function _testBindUnbind() {
function testBindUnbind() {
$this->model =& new User();
$result = $this->model->hasMany;
@ -519,7 +519,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);
@ -536,7 +536,7 @@ class ModelTest extends CakeTestCase {
$this->db->fullDebug = false;
}
function _testFindMagic() {
function testFindMagic() {
$this->model =& new User();
$result = $this->model->findByUser('mariano');
@ -552,7 +552,7 @@ class ModelTest extends CakeTestCase {
$this->assertEqual($result, $expected);
}
function _testRead() {
function testRead() {
$this->model =& new User();
$result = $this->model->read();
@ -591,7 +591,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);
@ -639,7 +639,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));
@ -894,7 +894,7 @@ function testRecursiveFindAllWithLimit() {
$this->assertEqual($result, $expected);
}
function _testSaveField() {
function testSaveField() {
$this->model =& new Article();
$this->model->id = 1;
@ -932,7 +932,7 @@ function testRecursiveFindAllWithLimit() {
$this->assertFalse($result);
}
function _testSave() {
function testSave() {
$this->model =& new User();
$data = array('User' => array('user' => 'user', 'password' => ''));
@ -1044,7 +1044,7 @@ function testRecursiveFindAllWithLimit() {
$this->assertEqual($result, $expected);
}
function _testRecursiveDel() {
function testRecursiveDel() {
$this->model =& new Article();
$result = $this->model->del(2);
@ -1073,7 +1073,7 @@ function testRecursiveFindAllWithLimit() {
$this->assertEqual($result, 0);
}
function _testFindAllThreaded() {
function testFindAllThreaded() {
$this->model =& new Category();
$result = $this->model->findAllThreaded();
@ -1157,7 +1157,7 @@ function testRecursiveFindAllWithLimit() {
$this->assertEqual($result, $expected);
}
function _testFindNeighbours() {
function testFindNeighbours() {
$this->model =& new Article();
$result = $this->model->findNeighbours(null, 'Article.id', '2');
@ -1181,7 +1181,7 @@ function testRecursiveFindAllWithLimit() {
$this->assertEqual($result, $expected);
}
function _testFindCombinedRelations() {
function testFindCombinedRelations() {
$this->model =& new Apple();
$result = $this->model->findAll();