From 38375bbec1f031be9d3b3e500a758d974e36cce4 Mon Sep 17 00:00:00 2001
From: Christian Schneider
Date: Thu, 22 Nov 2012 15:43:29 +0000
Subject: Remove smart_replace() as alias for store() because it is even worse
 a name than store()

---
 tests/it_dbi.t | 23 +++++++----------------
 1 file changed, 7 insertions(+), 16 deletions(-)

(limited to 'tests')

diff --git a/tests/it_dbi.t b/tests/it_dbi.t
index 8623437..b0b25ef 100755
--- a/tests/it_dbi.t
+++ b/tests/it_dbi.t
@@ -237,52 +237,43 @@ foreach ($record as $dummy_rec)
 is($count, 2, "Iterator reused");
 
 $GLOBALS['debug_sqllog'] = true;
-@$record->smart_replace(array('ID' => 5, 'x' => 6));
+@$record->store(array('ID' => 5, 'x' => 6));
 like(
 	$record->_sqllog[1]['query'],
 	"REPLACE",
-	"smart_replace => REPLACE for new entries"
+	"store => REPLACE for new entries"
 );
 $record->clear();
 @$record->read(5);
 is(
 	$record->x,
 	6,
-	"saving with smart_replace"
+	"saving with store"
 );
 
 $record->_sqllog = array();
-@$record->smart_replace(array('ID' => 5, 'x' => 7));
+@$record->store(array('ID' => 5, 'x' => 7));
 like(
 	$record->_sqllog[1]['query'],
 	"UPDATE",
-	"smart_replace => UPDATE for existing entries"
+	"store => UPDATE for existing entries"
 );
 $record->clear();
 @$record->read(5);
 is(
 	$record->x,
 	7,
-	"updating with smart_replace"
+	"updating with store"
 );
 
 $record->_sqllog = array();
-@$record->smart_replace(array('ID' => 5, 'x' => 7));
+@$record->store(array('ID' => 5, 'x' => 7));
 is(
 	$record->_sqllog[1]['query'],
 	null,	# Only SELECT, no UPDATE
 	"Optimized away UPDATE with same values"
 );
 
-$record->_sqllog = array();
-method_exists($record, "store") && @$record->store(array('ID' => 5, 'x' => 8));
-like(
-	$record->_sqllog[1]['query'],
-	"UPDATE",
-	"Check for store() alias of smart_replace for backward compatibility"
-);
-$GLOBALS['debug_sqllog'] = false;
-
 # Test field localization feature
 
 $dbi->query('create temporary table it_dbi_testlocalized (
-- 
cgit v1.2.3