Skip to content

Commit

Permalink
Fix DBD::Mock::Session->verify_bound_params to check for state exhaus…
Browse files Browse the repository at this point in the history
…tion
  • Loading branch information
wu-lee committed Mar 30, 2011
1 parent 3a1d41b commit 179e83a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/DBD/Mock.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1246,6 +1246,9 @@ sub verify_statement {
sub verify_bound_params {
my ($self, $dbh, $params) = @_;

($self->has_states_left)
|| die "Session states exhausted, only '" . scalar(@{$self->{states}}) . "' in DBD::Mock::Session (" . $self->{name} . ")";

my $current_state = $self->current_state;
if (exists ${$current_state}{bound_params}) {
my $expected = $current_state->{bound_params};
Expand Down

0 comments on commit 179e83a

Please sign in to comment.