Hi,
Need to run such mocks in codeception cest. But these methods are undefined in that context.
$observer = $this->createMock(Observer::class);
$observer->expects($this->once())
->method('update')
->with($this->equalTo('something'));
Also, Codeception has Stub which is not as flexible. Like I cannot use willReturnSelf()
on mocked methods.
Stub::make('User', [
'save' => \Codeception\Stub\Expected::once()
], $this);
My api.suite.yml
actor: ApiTester
modules:
enabled:
- Filesystem
- Db
- Yii2:
part: [orm, email, fixtures]
- Asserts
- REST:
url: http://localhost:8080/index-test.php/
depends: Yii2
part: JSON
configFile: 'config/test.php'
#- Helper\Api
Please suggest.
Thankls,
Vikas