Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cest-classes _after method in TestCase\Cest #279

Closed
Ragazzo opened this issue Apr 22, 2013 · 4 comments

Comments

Projects
None yet
2 participants
@Ragazzo
Copy link
Contributor

commented Apr 22, 2013

Why did u removed row for dispatching _after in \TestCase\Cest? see this commit
2b23195
_after must be called even when test has failed, am i wrong?
BTW. there also must be event-handling in \Subscribers\Cest for failed situation i guess, no? like it already done there for before/after.

@DavertMik

This comment has been minimized.

Copy link
Member

commented Apr 22, 2013

probably not.
"end" is event for regular test finish
"failed" for failed test
module subscriber triggers "after" for failed modules to. and maybe we are ok with those now

@Ragazzo

This comment has been minimized.

Copy link
Contributor Author

commented Apr 22, 2013

module subscriber triggers "after"

but, cests-classes are not inhereted from \Codeception\Module. they are just classes like class IndexCest{}
Please review your code and put some code back)) also it will be good to add _failed method handling in \Subscriber\Cest (https://github.com/Codeception/Codeception/blob/master/src/Codeception/Subscriber/Cest.php#L22)
So, if some of public methods will fail in Cest-class, _failed method will not be invoked in Cest-class, i think it is wrong, no?

@Ragazzo

This comment has been minimized.

Copy link
Contributor Author

commented Apr 23, 2013

Will provide asap PR with CestCase (base metaclass for all cest-classes) class and handling _after in _failed method in it, so we can discuss other things in PR.

@DavertMik

This comment has been minimized.

Copy link
Member

commented May 8, 2013

i think we discussed everything here.

_after will be called on any result: fail. success, error, thanks to reworked event system.

@DavertMik DavertMik closed this May 8, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.