Skip to content
This repository has been archived by the owner on Jun 30, 2023. It is now read-only.

Typoscript from setup.ts is not accessible #30

Open
robert197 opened this issue Jun 14, 2017 · 2 comments
Open

Typoscript from setup.ts is not accessible #30

robert197 opened this issue Jun 14, 2017 · 2 comments
Labels

Comments

@robert197
Copy link

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?

@robert197
Copy link
Author

robert197 commented Jun 15, 2017

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);

@IchHabRecht
Copy link
Contributor

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).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants