[TYPO3-mvc] RFC: Using PHPUnit for testing controller - a tutorial
Martin Kutschker
masi-no at spam-typo3.org
Tue Jan 12 08:35:31 CET 2010
Michael Knoll schrieb:
> Hi there,
>
> as I promised in one of my last posts, I wrote a small tutorial on how
> to test ExtBase controllers using PHPUnit. Thanks to Jochen Rau, which
> gave me some nice hints.
>
> You can find my Blog-Entry here:
>
> http://alturl.com/sgpf
>
> Please comment on this and let me know, what you think about it...
I didn't use PHPunit so far in real life so my question may be dumb. How is the action actually
tested? I think I understand roughly the set up of the mock objects. What I don't understand is
where is the state of the view tested once indexAction() is called. That would be b) quoting your
blog entry:
"b) want to check to make sure, the view holds the data we want it to hold, after the action is
performed"
I see no code that retrieves "galleries" and checks it's expected type (and value?).
Masi
More information about the TYPO3-project-typo3v4mvc
mailing list