[TYPO3-extbase-kickstarter] ExtensionBuilder Overwrites Unit Tests

Nick nick at jamalade.com
Tue Sep 25 11:33:12 CEST 2012


Hi Nico,

Thanks for the really quick response, sorry I got tied up with something else yesterday.

I have had a look and tried using "skip" this works at one level that is once the until tests are generated, before using skip, then tests aren't over written so my additional tests aren't lost. However that in away negates the round trip feature of Extension Builder, so when I add new Objects Unit tests aren't generated which is a shame :(

However i noticed that when I place the overwrite settings as before with "merge" the following is inserted at the end of the  unit test file before the final ?>:
## EXTENSION BUILDER DEFAULTS END TOKEN - Everything BEFORE this line is overwritten with the defaults of the extension builder

Unfortunately this is after the last terminating "}" of the class.  I can put my extra test methods here and replace(move) the brace and everything is hunky dory as long as I remember to delete the re-generate brace when saving from Extension Builder. Not ideal for a big project but fine for me for now.

best,

Nick



On 24 Sep 2012, at 10:43, Nicolas de Haen wrote:

> Hi Nikos,
> 
> did you try "skip" instead of "merge"?
> "Merge" is not supported for Unit Tests.
> 
> regards,
> Nico
> 
> Am 24.09.12 11:35, schrieb Nick:
>> Hi,
>> 
>> I have just recently started using ExtensionBuilder to help me get started writing Extbase extensions and in the process wanted to develop and add my own Unit tests for the classes generated, Domain and Controller. Unfortunately when regenerating the model after making changes in ExtensionBuilder my unit tests get lost/overwritten.
>> 
>> I have searched to see if there is a work around or known issue for this but so far had no luck :(
>> 
>>  I have also tried (hoping for success) the following settings in settings.yaml for ExtensionBuilder
>> 
>>  Tests:
>>        Unit:
>>           Controller: merge
>>           Domain:
>>              Model: merge
>> 
>> Unfortunately this didn't work
>> 
>> I then thought I could create a new test class per Domain/Controller object for my additional tests but these don't get picked up by PHPUnit, I am not exactly sure why perhaps this could be possible work with a setting somewhere?
>> 
>> I would really appreciate some ideas/workarounds ,
>> 
>> Best regards
>> 
>> Nikos
>> 
> 
> 
> -- 
> Nico de Haen
> ndh websolutions
> 
> Webprogrammierung, OpenSource, Typo3
> 
> 
> 
> http://www.ndh-websolutions.de
> _______________________________________________
> TYPO3-project-extbase-kickstarter mailing list
> TYPO3-project-extbase-kickstarter at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-extbase-kickstarter



More information about the TYPO3-project-extbase-kickstarter mailing list