All tests based on APITestCase can be slow. I've also seen more than one Jenkins failure due to GlobalTest::testMerge timing out. Also, added a meta-test on APITestCase to make sure that all its subclasses are marked with @group medium or @group large, to prevent new tests from re-causing the bug. Change-Id: I48630736a3d06574876fd1fa3d90899cfbc48012
20 lines
377 B
PHP
20 lines
377 B
PHP
<?php
|
|
|
|
/**
|
|
* @group API
|
|
* @group Database
|
|
* @group medium
|
|
*/
|
|
class ApiFormatPhpTest extends ApiFormatTestBase {
|
|
|
|
function testValidPhpSyntax() {
|
|
|
|
$data = $this->apiRequest( 'php', array( 'action' => 'query', 'meta' => 'siteinfo' ) );
|
|
|
|
$this->assertInternalType( 'array', unserialize( $data ) );
|
|
$this->assertGreaterThan( 0, count( (array) $data ) );
|
|
|
|
|
|
}
|
|
|
|
}
|