"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tests/phpunit/includes/libs/XhprofDataTest.php" between
mediawiki-1.31.1.tar.gz and mediawiki-1.32.0.tar.gz

About: MediaWiki is a wiki engine (the collaborative editing software that runs for e.g. Wikipedia, the free encyclopedia).

XhprofDataTest.php  (mediawiki-1.31.1):XhprofDataTest.php  (mediawiki-1.32.0)
skipping to change at line 22 skipping to change at line 22
* *
* You should have received a copy of the GNU General Public License along * You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc., * with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html * http://www.gnu.org/copyleft/gpl.html
* *
* @file * @file
*/ */
/** /**
* @uses XhprofData
* @uses AutoLoader
* @copyright © 2014 Wikimedia Foundation and contributors * @copyright © 2014 Wikimedia Foundation and contributors
* @since 1.25 * @since 1.25
*/ */
class XhprofDataTest extends PHPUnit\Framework\TestCase { class XhprofDataTest extends PHPUnit\Framework\TestCase {
use MediaWikiCoversValidator; use MediaWikiCoversValidator;
/** /**
* @covers XhprofData::splitKey * @covers XhprofData::splitKey
* @dataProvider provideSplitKey * @dataProvider provideSplitKey
skipping to change at line 157 skipping to change at line 155
$metric[$key]['total'], $metric[$ key]['exclusive'] $metric[$key]['total'], $metric[$ key]['exclusive']
); );
} }
} }
} }
} }
/** /**
* @covers XhprofData::getCallers * @covers XhprofData::getCallers
* @covers XhprofData::getCallees * @covers XhprofData::getCallees
* @uses XhprofData
*/ */
public function testEdges() { public function testEdges() {
$xhprofData = $this->getXhprofDataFixture(); $xhprofData = $this->getXhprofDataFixture();
$this->assertSame( [], $xhprofData->getCallers( 'main()' ) ); $this->assertSame( [], $xhprofData->getCallers( 'main()' ) );
$this->assertSame( [ 'foo', 'xhprof_disable' ], $this->assertSame( [ 'foo', 'xhprof_disable' ],
$xhprofData->getCallees( 'main()' ) $xhprofData->getCallees( 'main()' )
); );
$this->assertSame( [ 'main()' ], $this->assertSame( [ 'main()' ],
$xhprofData->getCallers( 'foo' ) $xhprofData->getCallers( 'foo' )
); );
$this->assertSame( [], $xhprofData->getCallees( 'strlen' ) ); $this->assertSame( [], $xhprofData->getCallees( 'strlen' ) );
} }
/** /**
* @covers XhprofData::getCriticalPath * @covers XhprofData::getCriticalPath
* @uses XhprofData
*/ */
public function testCriticalPath() { public function testCriticalPath() {
$xhprofData = $this->getXhprofDataFixture(); $xhprofData = $this->getXhprofDataFixture();
$path = $xhprofData->getCriticalPath(); $path = $xhprofData->getCriticalPath();
$last = null; $last = null;
foreach ( $path as $key => $value ) { foreach ( $path as $key => $value ) {
list( $func, $call ) = XhprofData::splitKey( $key ); list( $func, $call ) = XhprofData::splitKey( $key );
$this->assertSame( $last, $func ); $this->assertSame( $last, $func );
$last = $call; $last = $call;
 End of changes. 3 change blocks. 
4 lines changed or deleted 0 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)