Skip to content

Commit

Permalink
Reverting change that makes postgres cry
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Nov 1, 2013
1 parent 3dc36a3 commit 5f86fef
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions Cake/Test/TestCase/ORM/TableTest.php
Expand Up @@ -951,7 +951,7 @@ public function testFindPersistedEntities() {
* @return void
*/
public function testExists() {
$table = TableRegistry::get('user');
$table = TableRegistry::get('users');
$this->assertTrue($table->exists(['id' => 1]));
$this->assertFalse($table->exists(['id' => 501]));
$this->assertTrue($table->exists(['id' => 3, 'username' => 'larry']));
Expand Down Expand Up @@ -1027,7 +1027,7 @@ public function testSaveNewEntity() {
'created' => new \DateTime('2013-10-10 00:00'),
'updated' => new \DateTime('2013-10-10 00:00')
]);
$table = TableRegistry::get('user');
$table = TableRegistry::get('users');
$this->assertSame($entity, $table->save($entity));
$this->assertEquals($entity->id, self::$nextUserId);

Expand All @@ -1050,7 +1050,7 @@ public function testSaveEntityOnlySchemaFields() {
'created' => new \DateTime('2013-10-10 00:00'),
'updated' => new \DateTime('2013-10-10 00:00'),
]);
$table = TableRegistry::get('user');
$table = TableRegistry::get('users');
$this->assertSame($entity, $table->save($entity));
$this->assertEquals($entity->id, self::$nextUserId);

Expand All @@ -1073,7 +1073,7 @@ public function testSaveWithFieldList() {
'created' => new \DateTime('2013-10-10 00:00'),
'updated' => new \DateTime('2013-10-10 00:00')
]);
$table = TableRegistry::get('user');
$table = TableRegistry::get('users');
$fieldList = ['fieldList' => ['username', 'created', 'updated']];
$this->assertSame($entity, $table->save($entity, $fieldList));
$this->assertEquals($entity->id, self::$nextUserId);
Expand All @@ -1090,7 +1090,7 @@ public function testSaveWithFieldList() {
* @return void
*/
public function testBeforeSaveModifyData() {
$table = TableRegistry::get('user');
$table = TableRegistry::get('users');
$data = new \Cake\ORM\Entity([
'username' => 'superuser',
'created' => new \DateTime('2013-10-10 00:00'),
Expand All @@ -1114,7 +1114,7 @@ public function testBeforeSaveModifyData() {
* @return void
*/
public function testBeforeSaveModifyOptions() {
$table = TableRegistry::get('user');
$table = TableRegistry::get('users');
$data = new \Cake\ORM\Entity([
'username' => 'superuser',
'password' => 'foo',
Expand Down Expand Up @@ -1146,7 +1146,7 @@ public function testBeforeSaveModifyOptions() {
* @return void
*/
public function testBeforeSaveStopEvent() {
$table = TableRegistry::get('user');
$table = TableRegistry::get('users');
$data = new \Cake\ORM\Entity([
'username' => 'superuser',
'created' => new \DateTime('2013-10-10 00:00'),
Expand All @@ -1170,7 +1170,7 @@ public function testBeforeSaveStopEvent() {
* @return void
*/
public function testAfterSave() {
$table = TableRegistry::get('user');
$table = TableRegistry::get('users');
$data = new \Cake\ORM\Entity([
'username' => 'superuser',
'created' => new \DateTime('2013-10-10 00:00'),
Expand Down Expand Up @@ -1377,7 +1377,7 @@ public function testSaveOnlyDirtyProperties() {
$entity->dirty('created', true);
$entity->dirty('updated', true);

$table = TableRegistry::get('user');
$table = TableRegistry::get('users');
$this->assertSame($entity, $table->save($entity));
$this->assertEquals($entity->id, self::$nextUserId);

Expand All @@ -1399,7 +1399,7 @@ public function testsASavedEntityIsClean() {
'created' => new \DateTime('2013-10-10 00:00'),
'updated' => new \DateTime('2013-10-10 00:00')
]);
$table = TableRegistry::get('user');
$table = TableRegistry::get('users');
$this->assertSame($entity, $table->save($entity));
$this->assertFalse($entity->dirty('usermane'));
$this->assertFalse($entity->dirty('password'));
Expand All @@ -1420,7 +1420,7 @@ public function testsASavedEntityIsNotNew() {
'created' => new \DateTime('2013-10-10 00:00'),
'updated' => new \DateTime('2013-10-10 00:00')
]);
$table = TableRegistry::get('user');
$table = TableRegistry::get('users');
$this->assertSame($entity, $table->save($entity));
$this->assertFalse($entity->isNew());
}
Expand All @@ -1437,7 +1437,7 @@ public function testSaveUpdateAuto() {
'id' => 2,
'username' => 'baggins'
]);
$table = TableRegistry::get('user');
$table = TableRegistry::get('users');
$original = $table->find('all')->where(['id' => 2])->first();
$this->assertSame($entity, $table->save($entity));

Expand Down

0 comments on commit 5f86fef

Please sign in to comment.