And then there were none.

This commit is contained in:
Joshua Sherman 2014-01-20 01:25:11 -05:00
parent 54cb6dfe83
commit 7c8ae14b75
2 changed files with 24 additions and 25 deletions

View file

@ -603,20 +603,21 @@ class ModelTest extends PHPUnit_Framework_TestCase
$this->assertEquals($count + 5, $model->record['count']);
}
# public function testMultipleQueueUpdate()
# {
# $model = new MockModel(['conditions' => ['id <=' => 5]]);
#
# var_dump($model->records);
#
# # while ($model->walk())
# # {
# # $model->record['field1'] = String::random();
# # $model->queue();
# # }
#
# # $model->commit();
# }
public function testMultipleQueueUpdate()
{
$_SESSION['__pickles']['security']['user_id'] = 1;
$model = new MockModel();
for ($i = 3; $i <= 5; $i++)
{
$model->record['id'] = $i;
$model->record['field1'] = String::random();
$model->record['updated_id'] = 1;
$model->queue();
}
$model->commit();
}
}
?>