Merge "mediawiki.api: Remove console warning for legacy token type"
[mediawiki.git] / tests / phpunit / includes / GlobalFunctions / WfShellExecTest.php
blobc7d91e07f4b9f729b8c623ed5b6f4948e8c87f37
1 <?php
3 /**
4 * @group GlobalFunctions
5 * @covers ::wfShellExec
6 */
7 class WfShellExecTest extends MediaWikiIntegrationTestCase {
8 public function testT69870() {
9 if ( wfIsWindows() ) {
10 // T209159: Anonymous pipe under Windows does not support asynchronous read and write,
11 // and the default buffer is too small (~4K), it is easy to be blocked.
12 $this->markTestSkipped(
13 'T209159: Anonymous pipe under Windows cannot withstand such a large amount of data'
17 // Test several times because it involves a race condition that may randomly succeed or fail
18 for ( $i = 0; $i < 10; $i++ ) {
19 $output = wfShellExec( 'printf "%-333333s" "*"' );
20 $this->assertEquals( 333333, strlen( $output ) );