DBTNG
DBTNG copied to clipboard
Test System for DBTNG
Now that DBTNG is out of Drupal, it no longer has simpletest. In light of existing schema issues Drupal is facing with PostgreSQL and SQLite. Should would conceive a test system within the framework that can ensure the way DBTNG i intended to work?
Yes we should! I actually believe we should use PHPUnit. It's reasonably similar to Simpletest, at least on the test level, and it is far and away the most popular testing framework for PHP. Most of our tests from Drupal core can probably port over fairly easily, aside from the schema-related parts. Schema API is the least portable part anyway, so we'll probably need to do quite a bit of work there.
I've forked your repository and have begun working on a test framework based on PHPUnit. So far so good. Some things to ponder over though:
- I introduced a constant called DBTNG_DIR in place of DRUPAL_ROOT
- t() is everywhere. What should we do about that?
- I added the database section of the settings.php file to the code base as it has nice documentation and makes sense.
-
Sounds good.
-
For the time being, I'd say rip it out entirely. That's too Drupal-specific. We'll have to figure out some other approach later, if we decide one is warranted.
-
Sounds good.
Let me know when you have a pull request for me to merge back in. :-)
Is ripping the translation stuff out really a good idea? How does Drupal then merge DBTNG changes back into its core?