[otrs-cvs] otrs/scripts/test/CPAN YAML.t,1.16,1.17
"CVS commits notifications of OTRS.org" <[email protected]>
| Newsgroups | gmane.comp.otrs.cvs |
|---|---|
| Message-ID | <[email protected]> |
Comments:
Update of /home/cvs/otrs/scripts/test/CPAN
In directory lancelot:/tmp/cvs-serv9398/scripts/test/CPAN
Modified Files:
YAML.t
Log Message:
Re-implemented Kernel::System::YAML as OOP.
Author: cr
Index: YAML.t
===================================================================
RCS file: /home/cvs/otrs/scripts/test/CPAN/YAML.t,v
retrieving revision 1.16
retrieving revision 1.17
diff -2 -u -d -r1.16 -r1.17
--- YAML.t 16 Jan 2013 20:47:01 -0000 1.16
+++ YAML.t 17 Jan 2013 03:39:21 -0000 1.17
@@ -17,4 +17,11 @@
use Kernel::System::YAML;
+# create needed objects
+my $ConfigObject = Kernel::Config->new();
+my $YAMLObject = Kernel::System::YAML->new(
+ %{$Self},
+ ConfigObject => $ConfigObject,
+);
+
my @Tests = (
{
@@ -69,15 +76,15 @@
ENGINE:
for my $Engine (qw(YAML::XS YAML)) {
-
+
# locally override the internal engine of YAML::Any to force testing
local @YAML::Any::_TEST_ORDER = ($Engine);
-
+
TEST:
for my $Test (@Tests) {
- next TEST if $Engine eq $Test->{SkipEngine};
-
- my $YAMLString = $Test->{YAMLString} || Kernel::System::YAML::Dump( $Test->{Data} );
- my $YAMLData = Kernel::System::YAML::Load( $YAMLString );
-
+ next TEST if defined $Test->{SkipEngine} && $Engine eq $Test->{SkipEngine};
+
+ my $YAMLString = $Test->{YAMLString} || $YAMLObject->Dump( Data => $Test->{Data} );
+ my $YAMLData = $YAMLObject->Load( Data => $YAMLString );
+
$Self->IsDeeply(
$YAMLData,
---------------------------------------------------------------------
OTRS mailing list: cvs-log - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/cvs-log
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/cvs-log