Changes from vanilla phpunit here:
- hhvm code coverage: The default coverage provided by the combo of phpunit and hhvm doesn't handle the hhvm changes well.
- some path scanning functionality doesn't scale well with as large of a codebase we have, so some small tweaks on number of file scans and parses of code were done.
- We utilize strict hhvm tests, made a change to TestSuite.php to support running non-static doBeforeClassSetup and doAfterClassSetup function instead of mixing modes between strict and non-strict code.
- Fixed: Multiline use statements showing up as uncovered.
- New: Added support for enums spanning multiple lines.
- Converted all of php-token-stream to be hack strict.
- Moved 'most' of php-code-coverage into hack, some strict, some not.
- Rewrote a significant portion of how the code coverage stack is handled in order to lower memory footprint and not pass around the line status stack constantly.
- Made the code view use solarized dark as the default for viewing code.
- Extracted more of the html from the render to the template structure.
- Collapsed all of the HHVM driver code to be within the "HHVM" driver, in preparation for supporting the newer debuggers available.
- Changed ordering of classes, functions, lines to be consistent throughout the UI.
- Removed / reduced the usage of TextTemplate usage within the html template, as we have a very large code base the amount of str_replace overhead catches up with you.
- Removed the file require|inclusion within code coverage. This lead to older php code being blind executed. Also hid some of the performance issues around loading of certain legacy libraries.
- Migrated PHP_Util_XML to Zynga\PHPUnit\V2\Environment\XML
- Migrated PHP_Util_String to Zynga\PHPUnit\V2\Environment\Strings
- @covers is removed.
Starting with 2.x release track attributes are used instead of the older @foo docblocks.
Crib sheet:
- @dataProvider becomes <<dataProvider("..")>>
- @requires becomes: <<requires("..")>>
- @expectedException becomes: <expectedException("..")>>
- @expectedExceptionMessage becomes: <<expectedExceptionMessage("..")>>
- @expectedExceptionCode becomes: <<expectedExceptionCode("..")>>
Removed:
- @testWith - use @dataProvider so we can keep type saftey.
What if I need to specify multiple of the same attribute, use an array:
- <<requires(["foo", "bar"])>>
- SebastianBergmann\TokenStream\Token\StreamMethodStructure->methodSignature isn't working correctly, needs fixing. Might be only multi-line function signatures that are broken - TBD.
- PHP_Token_Function: Needs a verification that it handles marking a multi-line abstract function definition as non-executable.
- LineToTokens should be moved into stream functionality.
- Need to repair the dashboard functionality, as it's fully broken right now.
- Performance profiling for the report generation needs to continue.
The core developer has opened tickets with the HHVM team wanting for fixes to behave like php. It's unlikely the HHVM team will change to support the same functionality as they have added a improvement to XDebug showing you the number of times that a pieces of code is executed.