diff --git a/e107_tests/tests/unit/e107Test.php b/e107_tests/tests/unit/e107Test.php index b03bff553..fdcd224a8 100644 --- a/e107_tests/tests/unit/e107Test.php +++ b/e107_tests/tests/unit/e107Test.php @@ -1076,6 +1076,7 @@ class e107Test extends \Codeception\Test\Unit $e107 = $this->e107; $templates = scandir(e_CORE . "templates"); + // Load these constants before other tests fail because of what this test does: $e107::loadAdminIcons(); $exclude = array( @@ -1357,7 +1358,6 @@ class e107Test extends \Codeception\Test\Unit public function testThemeLan() { $result = e107::themeLan(null, 'basic-light'); - var_dump($result); }*/ /* @@ -1887,9 +1887,6 @@ class e107Test extends \Codeception\Test\Unit // $this->e107->prepare_request(); - // var_dump($_SERVER['QUEST_STRING']); - - // $res = null; // $this->assertTrue($res); } @@ -2009,12 +2006,10 @@ class e107Test extends \Codeception\Test\Unit $result = $obj::isInstalled('user'); - // var_dump($result); $this->assertTrue($result); $result = $obj::isInstalled('news'); - // var_dump($result); $this->assertTrue($result); } diff --git a/e107_tests/tests/unit/e107_user_extendedTest.php b/e107_tests/tests/unit/e107_user_extendedTest.php index 8cb15d789..030ad971f 100644 --- a/e107_tests/tests/unit/e107_user_extendedTest.php +++ b/e107_tests/tests/unit/e107_user_extendedTest.php @@ -116,21 +116,9 @@ ); // clear the table. - $sql = e107::getDb(); - /* $fieldCount = (int) $sql->count('user_extended_struct'); - - if($fieldCount > 17) - { - codecept_debug("Truncating user_extended_struct"); - $sql->truncate('user_extended_struct'); - - }*/ - $sql->truncate('user_extended_struct'); - - // Add a field of each type. foreach($this->structTypes as $k=> $v) { @@ -1124,7 +1112,6 @@ { $data = $this->ue->getFields(); $this->assertArrayHasKey('text', $data); - // var_dump($data); // $this->assertCount(15, $data); $data = $this->ue->getFields(16); diff --git a/e107_tests/tests/unit/e_admin_uiTest.php b/e107_tests/tests/unit/e_admin_uiTest.php index 0c2362a7c..3b1befe59 100644 --- a/e107_tests/tests/unit/e_admin_uiTest.php +++ b/e107_tests/tests/unit/e_admin_uiTest.php @@ -25,12 +25,7 @@ { $result = preg_replace('/[^\w\-:.]/', '', $var['text']); // this pattern used in parts of the admin-ui. $this->assertEquals($var['expected'], $result); - //var_dump($result); } - - // echo array_flip(get_defined_constants(true)['pcre'])[preg_last_error()]; - - } diff --git a/e107_tests/tests/unit/e_arrayTest.php b/e107_tests/tests/unit/e_arrayTest.php index 964368edf..d2a03347a 100644 --- a/e107_tests/tests/unit/e_arrayTest.php +++ b/e107_tests/tests/unit/e_arrayTest.php @@ -132,10 +132,6 @@ $data = array ( $input = array('myarray'=>'myvalue'); $result = $this->arrObj->unserialize($input); $this->assertSame($input, $result); - - - // var_dump($actual); - } /* diff --git a/e107_tests/tests/unit/e_db_abstractTest.php b/e107_tests/tests/unit/e_db_abstractTest.php index 3408fc695..35c8dffb7 100644 --- a/e107_tests/tests/unit/e_db_abstractTest.php +++ b/e107_tests/tests/unit/e_db_abstractTest.php @@ -851,11 +851,17 @@ abstract class e_db_abstractTest extends \Codeception\Test\Unit public function testIsEmpty() { - $result = $this->db->isEmpty('plugin'); + $this->db->copyTable('user', 'test_is_empty', true, true); + + $result = $this->db->isEmpty('test_is_empty'); $this->assertFalse($result); - // $result = $this->db->isEmpty('comments'); - // $this->assertTrue($result); + $this->db->truncate('test_is_empty'); + + $result = $this->db->isEmpty('test_is_empty'); + $this->assertTrue($result); + + $this->db->dropTable('test_is_empty'); $result = $this->db->isEmpty(); $this->assertFalse($result); @@ -1010,10 +1016,6 @@ abstract class e_db_abstractTest extends \Codeception\Test\Unit ); $this->assertEquals($expected, $actual); - - - //$actual = $this->db->getFieldDefs('userclass_classes'); - //var_dump($actual); } diff --git a/e107_tests/tests/unit/e_mediaTest.php b/e107_tests/tests/unit/e_mediaTest.php index e5633fbac..cad661cb9 100644 --- a/e107_tests/tests/unit/e_mediaTest.php +++ b/e107_tests/tests/unit/e_mediaTest.php @@ -80,11 +80,8 @@ $json = $this->md->processAjaxImport($file,$var['param']); $result = json_decode($json, JSON_PRETTY_PRINT); - // var_dump($result); $this->assertNotFalse($result); - // var_dump($result); - $this->assertStringEndsWith('/'.basename($var['file']), $result['result']); $this->assertNotEmpty($result['preview']); diff --git a/e107_tests/tests/unit/e_menu_layoutTest.php b/e107_tests/tests/unit/e_menu_layoutTest.php index 9b1dc15c4..bfbed2861 100644 --- a/e107_tests/tests/unit/e_menu_layoutTest.php +++ b/e107_tests/tests/unit/e_menu_layoutTest.php @@ -166,8 +166,6 @@ $expectedLength = $length; $actualLength = strlen($content); - //var_dump($key. " = ".$actualLength); - $this->assertEquals($expectedLength, $actualLength, $key. " is different"); } diff --git a/e107_tests/tests/unit/e_parseTest.php b/e107_tests/tests/unit/e_parseTest.php index 741456990..dee0dde1b 100644 --- a/e107_tests/tests/unit/e_parseTest.php +++ b/e107_tests/tests/unit/e_parseTest.php @@ -1062,8 +1062,6 @@ while($row = $sql->fetch()) $html = "
My paragraph bold