Delete basicrels tests. Modify run tests to use new syntax. Remove helperrels test...
[dbsrgits/DBIx-Class.git] / t / run / 25utf8.tl
index 278dde4..c0f39ed 100644 (file)
@@ -1,23 +1,27 @@
-sub run_tests {
-    my $schema = shift;
+use strict;
+use warnings;  
 
-    eval 'use Encode ; 1'
-        or plan skip_all, 'Install Encode run this test';
+use Test::More;
+use lib qw(t/lib);
+use DBICTest;
 
-    plan tests => 2;
+my $schema = DBICTest::init_schema();
 
-    DBICTest::Schema::Artist->load_components('UTF8Columns');
-    DBICTest::Schema::Artist->utf8_columns('name');
-    Class::C3->reinitialize();
+eval 'use Encode ; 1'
+    or plan skip_all => 'Install Encode run this test';
 
-    my $artist = $schema->resultset("Artist")->create( { name => 'uni' } );
-    ok( Encode::is_utf8( $artist->name ), 'got name with utf8 flag' );
+plan tests => 2;
 
-    my $utf8_char = 'uniuni';
-    Encode::_utf8_on($utf8_char);
-    $artist->name($utf8_char);
-    ok( !Encode::is_utf8( $artist->{_column_data}->{name} ),
-        'store utf8 less chars' );
-}
+DBICTest::Schema::Artist->load_components('UTF8Columns');
+DBICTest::Schema::Artist->utf8_columns('name');
+Class::C3->reinitialize();
+
+my $artist = $schema->resultset("Artist")->create( { name => 'uni' } );
+ok( Encode::is_utf8( $artist->name ), 'got name with utf8 flag' );
+
+my $utf8_char = 'uniuni';
+Encode::_utf8_on($utf8_char);
+$artist->name($utf8_char);
+ok( !Encode::is_utf8( $artist->{_column_data}->{name} ),
+    'store utf8 less chars' );
 
-1;