User:WolfgangFahl/Workdocumentation 2015-12-27

= Semantic Mediawiki Debugging = see

Environment
Environment: MacOSX 10.11.2 El Capitan MacPorts MAMP see https://trac.macports.org/wiki/howto/MAMP Copyright (c) 1997-2015 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies with Xdebug v2.3.3, Copyright (c) 2002-2015, by Derick Rethans
 * MacOSX: Darwin neso.bitplan.com 15.2.0 Darwin Kernel Version 15.2.0: Fri Nov 13 19:56:56 PST 2015; root:xnu-3248.20.55~2/RELEASE_X86_64 x86_64
 * Apache/2.2.31 (Unix) mod_ssl/2.2.31 OpenSSL/1.0.2e DAV/2 PHP/5.6.16
 * mysql Ver 14.14 Distrib 5.6.28, for osx10.11 (x86_64) using  EditLine wrapper
 * PHP 5.6.16 (cli) (built: Dec 26 2015 14:55:14)

Installing xdebug
add to php.ini:

Installing Eclipse for PHP
Eclipse for PHP developers
 * https://eclipse.org/downloads/packages/

Trying to Debug with Eclipse

 * http://www.eclipse.org/pdt/help/html/debugging_a_php_web_page.htm

Creating a Project
New Project "MediaWiki" from source Create debug configuration for "index.php" with Debugger "XDebug", Default Port 9000

Timeout issues
Message: Page load failed with error: timeout ...
 * https://www.eclipse.org/forums/index.php/t/261279/

Trying to Debug PHP Unit Tests with Eclipse
Install Makegood http://marketplace.eclipse.org/content/makegood-1 from Eclipse Marketplace (search makegood)
 * http://blog.loftdigital.com/running-phpunit-tests-in-eclipse-pdt

MakeGood

 * https://github.com/piece/makegood/wiki
 * http://stackoverflow.com/questions/tagged/makegood
 * http://web.archive.org/web/20140817181801/http://piece-framework.com/projects/makegood/wiki/MakeGood_User_Guide_1_7_0
 * https://github.com/piece/makegood/issues/85
 * http://stackoverflow.com/a/34483373/1497139

Mediawiki phpunit with MakeGood
We need a valid entry point composer.json in SemanticMediaWiki defines a script "phpunit": "php ../../tests/phpunit/phpunit.php -c phpunit.xml.dist", Meaning that the phpunit.php from Mediawiki's tests/phpunit/phpunit.php is called as an entry point.

phpunit.php
= globals = 1) SMW\Tests\InTextAnnotationParserTest::testTextParse with data set #2 (0, array(array(true), false, true), 'Lorem ipsum dolor sit &$% con...Donec.', array('class="smw-highlighter" data-...nline"', false, 3, array('Foo', 'Bar', '_ERRC'), array('Tincidunt semper', '9001'))) ConfigException: GlobalVarConfig::get: undefined option: 'PasswordDefault'

get globals
= MakeGood = = Video = see http://profiwiki.bitplan.com/index.php/SMW_PHPUnit_Test_Debugging

Category:Workdocumentation