View Issue Details

IDProjectCategoryView StatusLast Update
0002438OXID eShop (all versions)4.07. Source code, Testpublic2011-01-25 17:40
Reporterwanis Assigned To 
PriorityhighSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Fixed in Version4.4.7 revision 33396 
Summary0002438: Fatal error then trying to build codecoverage or metrics on single test
Descriptionthen 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 Reproduce1) 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 Informationto fix this, /core/oxutilsobject.php:293 must be changed from
include $sParentPath;
to
include_once $sParentPath;
TagsNo tags attached.
Theme
BrowserAll
PHP Versionany
Database Versionany

Relationships

related to 0002049 resolvedalfonsas_cirtautas Cannot redeclare class xx_oxbasket_module... 

Activities

sarunas_valaskevicius

2011-01-25 17:40

reporter   ~0004014

fixed in oxutilsobject - include changed to include_once