wiki.techinc.nl/tests/phpunit/includes/api/format/ApiFormatPhpTest.php
Chad Horohoe 85a5f0eb85 Merge ApiTestSetup into ApiTestCase and update all subclasses. The amount of duplication here was nasty, and also lets us get rid of a bunch of useless require_once()s.
./phpunit.php --filter Api currently gives me: Tests: 24, Assertions: 107, Incomplete: 1, Skipped: 2.
2011-07-01 16:34:02 +00:00

18 lines
359 B
PHP

<?php
/**
* @group API
* @group Database
*/
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 ) );
}
}