Ticket #568 (new Feature Request)

Opened 6 months ago

Last modified 2 months ago

Mock Objects in Unit Tests?

Reported by: mwells Owned by: Geert
Priority: minor Milestone:
Component: Modules Version: SVN HEAD
Keywords: Cc:

Description

Purely a thought to be thrown out there, but what do people think about adding mock object generation to the Unit Test module?

I'd be pretty keen to have a look at doing this if I get a chance, and so may go ahead with it, but was really keen to know if this would be considered as a feature that would be included.

Another point is that I'm pretty sure I would have to use eval() (please any ideas avoiding this would be awesome) so would this be a show stopper in terms of wanting to include it?

Cheers

Matt

Change History

Changed 3 months ago by Shadowhand

  • owner changed from - No owner - to Geert

Changed 3 months ago by msaraujo

Geert,

I have started to draft the MockObjects? Approach for the Unit Test Module. Can we add a new class (not abstract) in libraries/Unit_Test.php to handle all the eval() calls? By the way, is there an alternative for not using eval() for loading Mock Objects?

Regards,

Marcelo Araujo

Changed 2 months ago by BrandX

Hey Marcelo, I think you added a change to the code in Unit_Test that requires xdebug to be installed now.

I'm opening a ticket for this, xdebug support might be nice, but should be optional.

Changed 2 months ago by BrandX

Note: See TracTickets for help on using tickets.