View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002438 | OXID eShop (all versions) | 4.07. Source code, Test | public | 2011-01-24 16:55 | 2011-01-25 17:40 |
Reporter | wanis | Assigned To | |||
Priority | high | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Fixed in Version | 4.4.7 revision 33396 | ||||
Summary | 0002438: Fatal error then trying to build codecoverage or metrics on single test | ||||
Description | then trying to make codecoverage or metrics on singe test suite, fatal error arise as autoloader includes the same module file twice. to realize i will provide trace for file includes. First one: .#0 /var/www/library/PHPUnit-3.4.9/PHPUnit/Util/Filter.php(382): include_once() #1 /var/www/library/PHPUnit-3.4.9/PHPUnit/Framework/TestResult.php(623): PHPUnit_Util_Filter::getFilteredCodeCoverage(Array, true) #2 /var/www/library/PHPUnit-3.4.9/PHPUnit/Util/Report.php(97): PHPUnit_Framework_TestResult->getCodeCoverageInformation() #3 /var/www/library/PHPUnit-3.4.9/PHPUnit/TextUI/TestRunner.php(478): PHPUnit_Util_Report::render(Object(PHPUnit_Framework_TestResult), 'report_dir', '', 'ISO-8859-1', true, false, 35, 70) #4 /var/www/library/PHPUnit-3.4.9/PHPUnit/TextUI/Command.php(213): PHPUnit_TextUI_TestRunner->doRun(Object(PHPUnit_Framework_TestSuite), Array) #5 /var/www/library/PHPUnit-3.4.9/PHPUnit/TextUI/Command.php(146): PHPUnit_TextUI_Command->run(Array, true) #6 /var/www/library/PHPUnit-3.4.9/phpunit.php(54): PHPUnit_TextUI_Command::main() #7 {main} Second one: }#0 /var/www/oxid/core/oxutilsobject.php(293): include() #1 /var/www/oxid/core/oxutilsobject.php(220): oxUtilsObject->_makeSafeModuleClassParents(Array, 'oxorder') #2 /var/www/oxid/core/oxfunctions.php(103): oxUtilsObject->getClassName('oxorder') #3 [internal function]: oxAutoload('DemoExampleOrde...') #4 /var/www/oxid/modules/demo/core/demoexampleorder.php(32): spl_autoload_call('DemoExampleOrde...') #5 /var/www/library/PHPUnit-3.4.9/PHPUnit/Util/Filter.php(382): include_once('/var/www/oxid/m...') #6 /var/www/library/PHPUnit-3.4.9/PHPUnit/Framework/TestResult.php(623): PHPUnit_Util_Filter::getFilteredCodeCoverage(Array, true) #7 /var/www/library/PHPUnit-3.4.9/PHPUnit/Util/Report.php(97): PHPUnit_Framework_TestResult->getCodeCoverageInformation() #8 /var/www/library/PHPUnit-3.4.9/PHPUnit/TextUI/TestRunner.php(478): PHPUnit_Util_Report::render(Object(PHPUnit_Framework_TestResult), 'report_dir', '', 'ISO-8859-1', true, false, 35, 70) #9 /var/www/library/PHPUnit-3.4.9/PHPUnit/TextUI/Command.php(213): PHPUnit_TextUI_TestRunner->doRun(Object(PHPUnit_Framework_TestSuite), Array) #10 /var/www/library/PHPUnit-3.4.9/PHPUnit/TextUI/Command.php(146): PHPUnit_TextUI_Command->run(Array, true) 0000011 /var/www/library/PHPUnit-3.4.9/phpunit.php(54): PHPUnit_TextUI_Command::main() 0000012 {main} | ||||
Steps To Reproduce | 1) write two modules in same directory 2) add this directory in bootstrap.php PHPUnit_Util_Filter::addDirectoryToWhitelist(oxPATH.'/modules/demo/core'); 3) write one test suite to only one of modules 4) try to run test with code coverage i used provided testing module in oxid-vm, and command line was like this: oxPATH=/var/www/oxid/ CODECOVERAGE=1 oxADMIN_PASSWD='adminpassw' php -d 'memory_limit=1024M' -d 'include_path=.:/var/www/library/PHPUnit-3.4.9' /var/www/library/PHPUnit-3.4.9/phpunit.php --verbose --bootstrap bootstrap.php --coverage-html report_dir unit/demoexamplearticleTest.php | ||||
Additional Information | to fix this, /core/oxutilsobject.php:293 must be changed from include $sParentPath; to include_once $sParentPath; | ||||
Tags | No tags attached. | ||||
Theme | |||||
Browser | All | ||||
PHP Version | any | ||||
Database Version | any | ||||
related to | 0002049 | resolved | alfonsas_cirtautas | Cannot redeclare class xx_oxbasket_module... |