DBTNG icon indicating copy to clipboard operation
DBTNG copied to clipboard

Test System for DBTNG

Open fiasco opened this issue 14 years ago • 4 comments

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?

fiasco avatar Jan 04 '11 04:01 fiasco

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.

Crell avatar Jan 04 '11 04:01 Crell

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:

  1. I introduced a constant called DBTNG_DIR in place of DRUPAL_ROOT
  2. t() is everywhere. What should we do about that?
  3. I added the database section of the settings.php file to the code base as it has nice documentation and makes sense.

fiasco avatar Jan 04 '11 10:01 fiasco

  1. Sounds good.

  2. 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.

  3. Sounds good.

Let me know when you have a pull request for me to merge back in. :-)

Crell avatar Jan 24 '11 02:01 Crell

Is ripping the translation stuff out really a good idea? How does Drupal then merge DBTNG changes back into its core?

fiasco avatar Apr 02 '11 09:04 fiasco