- Added the arrayRef() method to WebGUI::SQL::ResultSet, which is 12% faster
than the array() method. - Added more tests to the test suite.
This commit is contained in:
parent
03b4b0ed33
commit
6766c63731
4 changed files with 49 additions and 2 deletions
6
t/SQL.t
6
t/SQL.t
|
|
@ -17,7 +17,7 @@ use WebGUI::Session;
|
|||
use Data::Dumper;
|
||||
use Test::Deep;
|
||||
|
||||
use Test::More tests => 49; # increment this value for each test you create
|
||||
use Test::More tests => 50; # increment this value for each test you create
|
||||
|
||||
my $session = WebGUI::Test->session;
|
||||
|
||||
|
|
@ -28,6 +28,10 @@ ok(my $sth = $session->db->read("select * from settings"), "read()");
|
|||
my @row = $sth->array;
|
||||
is(@row, 2, "array()");
|
||||
|
||||
# arrayRef
|
||||
my $row = $sth->arrayRef;
|
||||
is(@{$row}, 2, "arrayRef()");
|
||||
|
||||
# getColumnNames
|
||||
my @columnNames = $sth->getColumnNames;
|
||||
ok($columnNames[0] eq "name" && $columnNames[1] eq "value", "geColumnNames()");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue