wiki.techinc.nl/tests/phpunit/includes/api/format/ApiFormatPhpTest.php
Brad Jorsch 252ae6268b (bug 43762) Mark slow unit test as @group medium
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
2013-01-18 14:07:49 -05:00

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 ) );
}
}