X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Flibs%2Frdbms%2Fdatabase%2FDatabaseTest.php;h=4a0a7e71dff645f2ec79aa3b685f945b0197c1b9;hb=75160bdd3b4ac3642d147cda46e47c809999937d;hp=ee7ad2f2a24fd72ba5e95c0725a790405b883ce1;hpb=09b6dddae2a21c8b03efae46539cca47086f5574;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/libs/rdbms/database/DatabaseTest.php b/tests/phpunit/includes/libs/rdbms/database/DatabaseTest.php index ee7ad2f2a2..4a0a7e71df 100644 --- a/tests/phpunit/includes/libs/rdbms/database/DatabaseTest.php +++ b/tests/phpunit/includes/libs/rdbms/database/DatabaseTest.php @@ -7,6 +7,8 @@ use Wikimedia\TestingAccessWrapper; class DatabaseTest extends PHPUnit_Framework_TestCase { + use MediaWikiCoversValidator; + protected function setUp() { $this->db = new DatabaseTestHelper( __CLASS__ . '::' . $this->getName() ); } @@ -120,6 +122,13 @@ class DatabaseTest extends PHPUnit_Framework_TestCase { ], 'table1 LEFT JOIN (table2 JOIN table3 ON ((t2_id = t3_id))) ON ((t1_id = t2_id))' ], + 'join with degenerate parenthesized group' => [ + [ 'table1', 'n' => [ 't2' => 'table2' ] ], + [ + 'n' => [ 'LEFT JOIN', 't1_id = t2_id' ], + ], + 'table1 LEFT JOIN table2 t2 ON ((t1_id = t2_id))' + ], ]; }