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

atoum extension for this lib? #17

Open
Grummfy opened this issue Jan 25, 2018 · 7 comments
Open

atoum extension for this lib? #17

Grummfy opened this issue Jan 25, 2018 · 7 comments

Comments

@Grummfy
Copy link
Member

Grummfy commented Jan 25, 2018

Hello,
I think we could create an extension for atoum with specific assert like

$this->option($this->newTestedInstance->someValue())->isSome;
$this->option($this->newTestedInstance->someValue())->isNone;
$this->option($this->newTestedInstance->someValue())->isSome->boolean->isTrue;
// ...
@Hywan
Copy link
Member

Hywan commented Jan 26, 2018

Hello,

Why not. What is the pros and cons of using it? How to install it? Who will maintain it :-)?

@Grummfy
Copy link
Member Author

Grummfy commented Jan 26, 2018

I will be happy to do it, under the flag of hoa.
Just not sure what assertion to create.

Install il like any other atoum extension : composer require

@Hywan
Copy link
Member

Hywan commented Jan 26, 2018

Go :-).

@Grummfy
Copy link
Member Author

Grummfy commented Jan 26, 2018

Except the fact that we want something like

$this->option($this->newTestedInstance->someValue())->isSome;
$this->option($this->newTestedInstance->someValue())->isNone;

and we want to be able to make assertion on the value inside, do you see anything else to take into account?

@Hywan
Copy link
Member

Hywan commented Jan 26, 2018

Nop. Just extend boolean. And isSome must be equivalent to isSome() etc.

@Grummfy
Copy link
Member Author

Grummfy commented Jan 28, 2018

@Pierozi
Copy link
Member

Pierozi commented Feb 3, 2018

@Grummfy code looks good to me 👍
Have you tried to run a build on travis?

just a little tabulation here : https://github.com/Grummfy/atoum-option-extension/blob/master/composer.json#L13

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

No branches or pull requests

3 participants