Skip to content
Snippets Groups Projects
Commit 3d81c78f authored by Jens Steidl's avatar Jens Steidl :baby_chick:
Browse files

- removed test cases for getFileName()

- updated related subs
parent 7b04e7b9
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,7 @@ use strict;
use warnings;
use diagnostics;
use Test::More tests => 126;
use Test::More tests => 123;
use Test::Output;
use Test::Exception;
use Test::File;
......@@ -22,7 +22,7 @@ sub workaroundBagInfoTXT($$$){
my $file_path = $_[0];
my $key = $_[1];
my $value = $_[2];
my $file_name = SLUB::LZA::SIPBuilderBagIt::getFileName($file_path);
my $file_name = path($file_path)->basename();
# read a data file into an array
open my $handle, '<', $file_path;
......@@ -47,7 +47,7 @@ sub workaroundTagmanifestMD5($$$){
my $file_path = $_[0];
my $key = $_[1];
my $value = $_[2];
my $file_name = SLUB::LZA::SIPBuilderBagIt::getFileName($file_path);
my $file_name = path($file_path)->basename();
# read a data file into an array
open my $handle, '<', $file_path;
......@@ -72,7 +72,7 @@ sub workaroundTagmanifestSHA512($$$){
my $file_path = $_[0];
my $key = $_[1];
my $value = $_[2];
my $file_name = SLUB::LZA::SIPBuilderBagIt::getFileName($file_path);
my $file_name = path($file_path)->basename();
# read a data file into an array
open my $handle, '<', $file_path;
......@@ -763,10 +763,6 @@ is(equalFilesByIgnoringCRLF_LF($output_bubbleFilePath, $input_bubbleFilePath), 1
is(equalFilesByIgnoringCRLF_LF($output_sameModsFilePath, $input_modsFilePath), 1, "copyFilesToMeta() file $input_modsFilePath is identical to $output_sameModsFilePath");
is(equalFilesByIgnoringCRLF_LF($output_sameRightsFilePath, $input_rightsFilePath), 1, "copyFilesToMeta() file $input_rightsFilePath is identical to $output_sameRightsFilePath");
#
is(SLUB::LZA::SIPBuilderBagIt::getFileName($input_bubbleFilePath), "bubble.xml", "getFileName()");
throws_ok{ SLUB::LZA::SIPBuilderBagIt::getFileName(undef); } qr/path with file name is not defined/, "getFileName(\$file_name), file_name undef";
throws_ok{ SLUB::LZA::SIPBuilderBagIt::getFileName(""); } qr/invalid parameters/, "getFileName(), invalid parameters";
#
my $xsdName = "rights1.xsd";
my $input_rights = path(__FILE__)->parent->parent->child('export_dir_kitodo')->child('bagit')->child("rights");
is(SLUB::LZA::SIPBuilderBagIt::validateRightsXML($input_rights . "/Fallbeispiel-01.xml", $xsdName), 1, "validateRightsXML() Fallbeispiel-01.xml according to $xsdName");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment