[DDC-3414] Add test for "Joining on a table with inheritance produces badly formed ON clause"

Add a test for a bug report. The test is only simple with no assertions, since the SQL generated by Doctrine is invalid and generates an exception in SQLite.
 > I was worried that checking the SQL would make the test too fragile, or that different drivers would produce different SQL - or should I skip the test for other drivers?

You can explicitly set a platform in the connection in order to assert on the SQL. Changes in the generated SQL are rare, but we keep the tests in sync with those ourselves.

See https://github.com/doctrine/doctrine2/blob/bf5003f25e45e6f044f070c876e4401087dff004/tests/Doctrine/Tests/ORM/Query/SelectSqlGenerationTest.php for reference: maybe you can add your test directly there if there is a fitting inheritance.

 > Or, I can make it insert data and retrieve it, asserting that everything went as expected?

Sql generation/assertion is enough.