| Lines 3-9
          
      
      
        Link Here | 
        
          | 3 | use strict; | 3 | use strict; | 
        
          | 4 | use warnings; | 4 | use warnings; | 
        
          | 5 |  | 5 |  | 
          
            
              | 6 | use Test::More tests => 23; | 6 | use Test::More tests => 24; | 
        
          | 7 | use File::Basename; | 7 | use File::Basename; | 
        
          | 8 | use FindBin qw($Bin); | 8 | use FindBin qw($Bin); | 
        
          | 9 | use Archive::Extract; | 9 | use Archive::Extract; | 
  
    | Lines 53-58
          is( scalar grep( /^Test Plugin$/, @names), 1, "Koha::Plugins::GetPlugins functio
      
      
        Link Here | 
        
          | 53 | }); | 53 | }); | 
        
          | 54 | @names = map { $_->get_metadata()->{'name'} } @plugins; | 54 | @names = map { $_->get_metadata()->{'name'} } @plugins; | 
        
          | 55 | is( scalar grep( /^Test Plugin$/, @names), 1, "GetPlugins also found Test Plugin via a metadata tag" ); | 55 | is( scalar grep( /^Test Plugin$/, @names), 1, "GetPlugins also found Test Plugin via a metadata tag" ); | 
            
              |  |  | 56 | # Test two metadata conditions; one does not exist for Test.pm | 
            
              | 57 | # Since it is a required key, we should not find the same results | 
            
              | 58 | my @plugins2 = Koha::Plugins->new({ enable_plugins => 1 })->GetPlugins({ | 
            
              | 59 |     metadata => { my_example_tag  => 'find_me', not_there => '1' }, | 
            
              | 60 | }); | 
            
              | 61 | isnt( scalar @plugins2, scalar @plugins, 'GetPlugins with two metadata conditions' ); | 
        
          | 56 |  | 62 |  | 
        
          | 57 | SKIP: { | 63 | SKIP: { | 
        
          | 58 |     my $plugins_dir = C4::Context->config("pluginsdir"); | 64 |     my $plugins_dir = C4::Context->config("pluginsdir"); | 
            
              | 59 | -  |  |  |