Codeception / Codeception/AspectMock
How to return values from mocked method using test::spec
オープン
- 主要言語
- PHP
- スター
- 784
- フォーク
- 132
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Is it possible to return fake values from mocked methods using an object created with `test::spec` ? I've tried this and it never seems to call my fake method:
```
$fakeValue = '1';
$mock = test::spec('FakeClass', [
'fakeMethod' => function () {
return $fakeValue;
}
])->construct();
```
Then when I call $mock->fakeMethod() it's not returning my fakeValue;
Is this just supported or am I doing something wrong?
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
評価
この issue はまだ評価されていません。