testing-framework
testing-framework copied to clipboard
Typoscript from setup.ts is not accessible
Hey, It would be very useful to have an access to typoscript defined in setup.ts / setup.txt. I've tried to get an object with this settings or even mock it but didn't find a way to make it possible. Can you support this important feature or maybe give a sign how to make it happen?
We were able to fix this problem with another library called "Mockery"
$settingsProviderMock = Mockery::mock(
'overload:' . \anyNameSpace\anyNamespace\Settings\SettingsProvider::class
)->makePartial();
$settingsProviderMock->shouldReceive('fileStorage')->once()->andReturn(2);
Hi Robert,
I'm not quite sure what the actual problem is/was but did you have a look at mocks and/or prophecies in PHPUnit (https://phpunit.de/manual/current/en/test-doubles.html).