Skip to content

Conversation

@DavertMik
Copy link
Contributor

This is a very tiny patch that changes nothing in code logic, but is required to get AspectMock and Go Aop working with Yii2.

Go Aop is processing all include and require directives, replacing them with its filters. Unfortunately it doesn't play well with one-liners. So I had to break the code into few lines to get that working.

I was trying to fix this issue in Go Aop but looks like, the only option is to fix that in Yii2.

AspectMock can dramaticly improve unit testing in Yii2, and I plan to do a blogpost with tutorial about it.

DavertMik and others added 3 commits July 31, 2013 22:39
This is a very tiny patch that changes nothing in code logic, but is required to get [AspectMock](https://github.com/Codeception/AspectMock) and Go Aop working with Yii2. 

Go Aop is processing all `include` and `require` directives, replacing them with its filters. Unfortunately it doesn't play well with one-liners. So I had to break the code into few lines to get that working. 

I was trying to fix this issue in [Go Aop](goaop/framework#78) but looks like, the only option is to fix that in Yii2.

AspectMock can dramaticly improve unit testing in Yii2, and I plan to do a blogpost with tutorial about it.
@tonydspaniard
Copy link
Contributor

The modification is minimal, I agree to include it if that is going to make it work with those amazing libraries.

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 7f2d2da on DavertMik:patch-1 into a23f233 on yiisoft:master.

samdark added a commit that referenced this pull request Jul 31, 2013
A simple patch to get AspectMock and Go Aop working with Yii2
@samdark samdark merged commit 92d3c98 into yiisoft:master Jul 31, 2013
@samdark
Copy link
Member

samdark commented Jul 31, 2013

Merged.

@lisachenko
Copy link

Wow, it was fast ) Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants