use parent qw(Rose::Object);
+use IO::Dir;
use SL::DB::BackgroundJob;
+use SL::System::Process;
+
+sub get_known_job_classes {
+ tie my %dir_h, 'IO::Dir', File::Spec->catdir(File::Spec->splitdir(SL::System::Process->exe_dir), 'SL', 'BackgroundJob');
+ return sort map { s/\.pm$//; $_ } grep { m/\.pm$/ && !m/(?: ALL | Base) \.pm$/x } keys %dir_h;
+}
sub create_standard_job {
my $self_or_class = shift;
--- /dev/null
+use Test::More tests => 4;
+
+use lib 't';
+
+use Support::TestSetup;
+
+use_ok 'SL::BackgroundJob::Base';
+
+my @expected_known_job_classes = qw(CleanBackgroundJobHistory CreatePeriodicInvoices SelfTest Test);
+is_deeply [ SL::BackgroundJob::Base->get_known_job_classes ], \@expected_known_job_classes, 'get_known_job_classes called as class method';
+
+my $job = new_ok 'SL::BackgroundJob::Base';
+is_deeply [ $job->get_known_job_classes ], \@expected_known_job_classes, 'get_known_job_classes called as instance method';