Closed Haehnchen closed 7 years ago
Prevent mocking of interface
private function createAlwaysTrueFeature(): FeatureManagerInterface { $feature = $this->createMock(FeatureManagerInterface::class); $feature->method('isActive')->with('foobar')->willReturn(true); return $feature; }
Some ideas
(new AlwaysTrueFeatureManager())->isActive(); (new AlwaysFalseFeatureManager())->isActive(); (new NamedTrueFeatureManager('foobar', 'foobar1'))->isActive('foobar');
Good idea - i will add / change the tests for the next minor release this weekend.
I've removed some mocks and use real classes instead now.
Prevent mocking of interface
Some ideas