Fork me on GitHub
Subscribe 3

Ticket #373 (open task)

Create test framework+cases for fluxbb-database

  • Created: 2011-03-24 09:45:26
  • Reported by: Reines
  • Assigned to: Franz
  • Milestone: 2.0-alpha1
  • Component: testing
  • Priority: high

We should start using unit testing for the FluxBB modules where possible. Now that we are taking a more modular approach and using OOP this is easier than before.

History

Reines 2011-03-24 09:45:49

  • Priority changed from normal to low.

Reines 2011-03-24 09:46:06

  • Summary changed from Create test framework+cases to Create test framework+cases for fluxbb-database.

Reines 2011-03-24 09:50:48

  • Component changed from database to testing.

Franz 2011-03-24 11:33:15

What do you want to use as a framework? Or do you want to create a very simple one? (Could be fluxbb-testing, but that again might be overkill).

Reines 2011-03-24 11:37:10

I've never used phpunit, but since it is well known and people will be familiar with it, I would probably suggest giving it a try. That way all we need to do is add a test directory to each module repository with the tests in it, and not worry about coding the actual framework.

Franz 2011-03-24 11:38:57

I agree. Good choice.

Reines 2011-04-06 10:23:33

  • Owner Reines removed.

Franz 2011-10-31 11:14:10

  • Owner set to Franz.

Franz committed 0fc822a to database master 2011-10-31 11:14:27

First unit test.
Related to #373.

daris 2011-11-02 15:58:07

I saw that punbb uses phpunit also, but it is embedded within the its html markup. Can we copy their code? smile (I updated the markup on my localhost so it works with fluxbb) Commit to the fluxbb repo? tongue

Franz 2011-11-02 20:38:09

No, not yet.

First of all: can you show me their code? Also, there will still be some restructuring and I'm not sure how I will do all of this, so please wait.

daris 2011-11-02 20:51:31

I've changed my mind, there is no need to wrap phpunit to the html markup (like it is done in punbb).

I'm attaching the phpunit tests for parser -fluxbb 1.4 (they come from punbb, I updated some parts to work with fluxbb).
http://www.speedyshare.com/files/31045552/tests.zip

Franz committed 2eba461 to database master 2011-11-23 00:27:03

Add new unit test for CRUD queries.
Related to #373.

Franz committed 3aaf622 to database master 2011-11-24 11:11:56

Add test for replace queries.
Related to #373.

Franz committed 543dd57 to database master 2011-11-24 12:34:32

Add index to tableInfo() test and fix code appropriately.
Related to #373.

Franz 2012-01-26 12:54:20

  • Priority changed from low to high.

I will finish this very soon and would also call this important, as it should clearly shows what still needs to be done / fixed.