[TYPO3-dev] TestDrivenDevelopment & Typo3

Michael Knoll mimi at kaktusteam.de
Wed Oct 21 16:58:50 CEST 2009


Hello developers!

Since it seems to be the way to go, I would like to use 
TestDrivenDevelopment for extension development.

Now I installed all the plugins (PHPUnit...) and wrote some tests which 
works quite well.

So here's my question: Is there an easy way to write tests that require 
TS configuration in order to create objects that should be tested? Are 
there any experiences? I have some ideas, but I'm not quite sure what's 
the best solution:

a) Put TS in an array in the test case (no parsing required, but a lot 
of work to write all the braces)

b) Put TS in a string into the test case and parse it (here would be my 
next question, how can I do that the easiest way?)

c) Put TS into a file in a seperate folder into the test case. The same 
question as above: How can I parse them most easily.


I suppose for FE plugins, I still have to emulate a FE session, for 
which I have already written helper classes, so that should be no problem.

As I want to run my tests without even putting an instance of a plugin 
on a page, I think that using Page IDs with Typoscript in my testcode is 
a rather dirty way - isn't it?

Thanks for your help - when I find a good solution, I will be glad to 
assist anybody on writing some documentation for that stuff!


Regards

Mimi




More information about the TYPO3-dev mailing list