diff --git a/tests/CollectionTest.php b/tests/CollectionTest.php index fe550a8..54ebfbd 100644 --- a/tests/CollectionTest.php +++ b/tests/CollectionTest.php @@ -110,8 +110,8 @@ kit.ready(['collection', 'testing', 'flexKit'], function () { assertSame(3, collection.keys().count(), 'keys'); - xOb = {1: 1, 100: 100}; - x = new kit.Collection(xOb); + var xOb = {1: 1, 100: 100}; + var x = new kit.Collection(xOb); x.push(200); assertSame(200, x.last(), 'object push last'); x.push(0); @@ -139,7 +139,7 @@ kit.ready(['collection', 'testing', 'flexKit'], function () { assertSame(33, x.get('as', 33), 'get after forget'); xOb = {1: 10, 100: 101}; - x = new kit.Collection(xOb); + var x = new kit.Collection(xOb); assertSame(101, x.pull(100), 'pull'); assertSame(1, x.length, 'length after pull'); diff --git a/tests/index.php b/tests/index.php index 35481d0..50ca7a4 100644 --- a/tests/index.php +++ b/tests/index.php @@ -56,7 +56,11 @@ } data.kit.ready([], function () { setTimeout(function () { - var result = {}; + var result = { + fail: new kit.Collection(), + warn: new kit.Collection(), + pass: new kit.Collection(), + }; var countTest = 0; if(!data.kit.service.logger){ return; @@ -65,9 +69,6 @@ function pushResult(log){ var acceptKeys = new kit.Collection(['fail', 'warn', 'pass']); acceptKeys.each(function (key) { - if(!result.hasOwnProperty(key)) { - result[key] = new kit.Collection(); - } if(!support.isObject(log.message)) { return; } diff --git a/tests/loggerTest.php b/tests/loggerTest.php index 233cbdf..5a9e67a 100644 --- a/tests/loggerTest.php +++ b/tests/loggerTest.php @@ -16,10 +16,10 @@ $APPLICATION->ShowHead(); ?>