Skip to content
This repository has been archived by the owner on Sep 20, 2021. It is now read-only.

Mock: Add ability to mock constant #52

Merged
merged 1 commit into from
Nov 10, 2015
Merged

Conversation

Hywan
Copy link
Member

@Hywan Hywan commented Nov 10, 2015

It works \o/.

$this->constant->DIRECTORY_SEPARATOR = '/';

Please, can I have a peer review from @jubianchi?

The goal is to get soon to be able to merge hoaproject/Console#58. Then, I will propose it into atoum.

@Hywan
Copy link
Member Author

Hywan commented Nov 10, 2015

Related to atoum/atoum#511.

@Hywan Hywan mentioned this pull request Nov 10, 2015
$constantMocker = new Test\Mocker\Constant($this->getPhpMocker());
$this->getAssertionManager()->setPropertyHandler(
'constant',
function () use ($constantMocker) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use (& $constantMocker)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not necessary. PHP does it for us.

@jubianchi
Copy link
Member

seems good ;) would have been as easy to do it directly in atoum :p

@Hywan
Copy link
Member Author

Hywan commented Nov 10, 2015

@jubianchi Yup, that's really easy to integrate inside atoum and it's a great feature!

@Hywan
Copy link
Member Author

Hywan commented Nov 10, 2015

@jubianchi I can do that today.

@Bhoat Bhoat merged commit f830c5e into hoaproject:master Nov 10, 2015
@Hywan Hywan removed the in progress label Nov 10, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging this pull request may close these issues.

3 participants