The name change happened some time ago, and I think its about time to start using the name name! (Done with a find and replace) My personal motivation for doing this is that I have started trying out vscode as an IDE for mediawiki development, and right now it doesn't appear to handle php aliases very well or at all. Change-Id: I412235d91ae26e4c1c6a62e0dbb7e7cf3c5ed4a6
23 lines
721 B
PHP
23 lines
721 B
PHP
<?php
|
|
|
|
/**
|
|
* @group GlobalFunctions
|
|
* @covers ::wfShellExec
|
|
*/
|
|
class WfShellExecTest extends MediaWikiIntegrationTestCase {
|
|
public function testT69870() {
|
|
if ( wfIsWindows() ) {
|
|
// T209159: Anonymous pipe under Windows does not support asynchronous read and write,
|
|
// and the default buffer is too small (~4K), it is easy to be blocked.
|
|
$this->markTestSkipped(
|
|
'T209159: Anonymous pipe under Windows cannot withstand such a large amount of data'
|
|
);
|
|
}
|
|
|
|
// Test several times because it involves a race condition that may randomly succeed or fail
|
|
for ( $i = 0; $i < 10; $i++ ) {
|
|
$output = wfShellExec( 'printf "%-333333s" "*"' );
|
|
$this->assertEquals( 333333, strlen( $output ) );
|
|
}
|
|
}
|
|
}
|