Codeception / Codeception/AspectMock
How to return values from mocked method using test::spec
Abierto
- Lenguaje dominante
- PHP
- Estrellas
- 784
- Forks
- 132
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
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?
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.