rezzza / mock-extension Goto Github PK
View Code? Open in Web Editor NEW[Deprecated] Add possibility to define several mock engine for your behat tests
[Deprecated] Add possibility to define several mock engine for your behat tests
I'm trying to make a service mock:
$this->mocker->mockService(
'manager.mikrotik',
new AtoumAdapter(
'\MyBundle\Services\MikrotikManager'
)
);
I get this error:
Warning: Missing argument 1 for mock\MyBundle\Services\MikrotikManager::__construct(), called in vendor/rezzza/mock-extension/src/Adapter/AtoumAdapter.php on line 45 and defined in vendor/atoum/atoum/classes/mock/generator.php(183) : eval()'d code line 22
Where is my mistake?
Thanks in advance.
v.
Improve the doc or find a workaround
See #9
First up, thanks for providing the service mocker.
It looks like I need to name my default session 'symfony2' to use the mocker. So, even if i'm using the symfony2 session (but named it 'default'):
Behat\MinkExtension:
sessions:
default:
symfony2: ~
I get:
We can mock services only with symfony2 driver. Please use "@mink:symfony2" tag on scenario you want to be able to mock services (LogicException)
I have to change 'default' to symfony2:
Behat\MinkExtension:
sessions:
symfony2:
symfony2: ~
Shouldn't this be checking the class of the session (and not the name?): https://github.com/rezzza/mock-extension/blob/behat3/src/Mocker.php#L63
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.