Changes from branches/4.3/tests/phpunit/tests/db.php at r33991 to trunk/tests/phpunit/tests/db.php at r33259
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/db.php
r33991 r33259 527 527 function data_get_table_from_query() { 528 528 $table = 'a_test_table_name'; 529 $more_tables = array( 530 // table_name => expected_value 531 '`a_test_db`.`another_test_table`' => 'a_test_db.another_test_table', 532 'a-test-with-dashes' => 'a-test-with-dashes', 533 ); 529 $db_table = '`a_test_db`.`another_test_table`'; 534 530 535 531 $queries = array( … … 641 637 $querycount = count( $queries ); 642 638 for ( $ii = 0; $ii < $querycount; $ii++ ) { 643 foreach ( $more_tables as $name => $expected_name ) { 644 $new_query = str_replace( $table, $name, $queries[ $ii ] ); 645 $queries[] = array( $new_query, $expected_name ); 646 } 639 $db_query = str_replace( $table, $db_table, $queries[ $ii ] ); 640 $expected_db_table = str_replace( '`', '', $db_table ); 647 641 648 642 $queries[ $ii ] = array( $queries[ $ii ], $table ); 643 $queries[] = array( $db_query, $expected_db_table ); 649 644 } 650 645 return $queries;
Note: See TracChangeset
for help on using the changeset viewer.