Index: trunk/extensions/DataTransclusion/tests/DataTransclusionTest.php |
— | — | @@ -376,7 +376,9 @@ |
377 | 377 | function testDBDataTransclusionSource() { |
378 | 378 | $spec = array( |
379 | 379 | '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') ), |
381 | 383 | 'query' => 'SELECT * FROM foo ', |
382 | 384 | 'querySuffix' => ' GROUP BY id', |
383 | 385 | ); |
— | — | @@ -388,7 +390,9 @@ |
389 | 391 | $this->assertTrue( preg_match( '/GROUP BY id$/', $sql ) === 1 ); |
390 | 392 | $this->assertTrue( preg_match( "/WHERE \\( *name *= *'foo\\\\\"' *\\)/", $sql ) === 1 ); |
391 | 393 | |
392 | | - $sql = $source->getQuery( 'id', '3' ); |
| 394 | + #TODO: test automatic key conversion... but how? |
| 395 | + |
| 396 | + $sql = $source->getQuery( 'id', 3 ); |
393 | 397 | $this->assertTrue( preg_match( '/WHERE \( *id *= *3 *\)/', $sql ) === 1 ); |
394 | 398 | |
395 | 399 | // check blocking of evil field names |