Codeception / Codeception/AspectMock
How to return values from mocked method using test::spec
Ouverte
- Langage dominant
- PHP
- Étoiles
- 784
- Forks
- 132
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
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?
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Évaluation
Cette issue n'a pas encore été évaluée.