r72906 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r72905‎ | r72906 | r72907 >
Date:15:18, 13 September 2010
Author:daniel
Status:deferred
Tags:
Comment:
adoped test cases to new config spec
Modified paths:
  • /trunk/extensions/DataTransclusion/tests/DataTransclusionTest.php (modified) (history)

Diff [purge]

Index: trunk/extensions/DataTransclusion/tests/DataTransclusionTest.php
@@ -376,7 +376,9 @@
377377 function testDBDataTransclusionSource() {
378378 $spec = array(
379379 'name' => 'FOO',
380 - 'keyTypes' => array( 'id' => 'int', 'name' => 'string' ),
 380+ 'keyFields' => array( 'id' ),
 381+ 'fieldNames' => array( 'id', 'name' ),
 382+ 'fieldInfo' => array( 'id' => array( 'type' => 'int') ),
381383 'query' => 'SELECT * FROM foo ',
382384 'querySuffix' => ' GROUP BY id',
383385 );
@@ -388,7 +390,9 @@
389391 $this->assertTrue( preg_match( '/GROUP BY id$/', $sql ) === 1 );
390392 $this->assertTrue( preg_match( "/WHERE \\( *name *= *'foo\\\\\"' *\\)/", $sql ) === 1 );
391393
392 - $sql = $source->getQuery( 'id', '3' );
 394+ #TODO: test automatic key conversion... but how?
 395+
 396+ $sql = $source->getQuery( 'id', 3 );
393397 $this->assertTrue( preg_match( '/WHERE \( *id *= *3 *\)/', $sql ) === 1 );
394398
395399 // check blocking of evil field names

Status & tagging log