diff --git a/t/lib/WebGUI/Test.pm b/t/lib/WebGUI/Test.pm index c08de3b1f..e1b5f0935 100644 --- a/t/lib/WebGUI/Test.pm +++ b/t/lib/WebGUI/Test.pm @@ -848,7 +848,14 @@ Example call: }, 'SQL' => sub { my (undef, $sql) = @_; - return $CLASS->session->db->dbh->prepare($sql); + my $db = $CLASS->session->db; + my @params; + if ( ref $sql ) { + ( $sql, @params ) = @$sql; + } + return sub { + $db->write( $sql, \@params ); + } }, ); @@ -938,7 +945,9 @@ Example call: 'CODE' => sub { (shift)->(); }, - 'SQL' => 'execute', + 'SQL' => sub { + (shift)->(); + }, ); sub cleanupGuard {