Skip to content

Commit

Permalink
[REMOVAL] Remove deprecated ContentProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
NamelessCoder committed Aug 1, 2023
1 parent 1bea327 commit b37aafb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 28 deletions.
18 changes: 0 additions & 18 deletions Classes/Provider/ContentProvider.php

This file was deleted.

3 changes: 0 additions & 3 deletions Configuration/Services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ services:
FluidTYPO3\Flux\Provider\Provider:
shared: false
public: true
FluidTYPO3\Flux\Provider\ContentProvider:
shared: false
public: true
FluidTYPO3\Flux\Provider\PageProvider:
shared: false
public: true
Expand Down
12 changes: 5 additions & 7 deletions Tests/Unit/Provider/ProviderResolverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
* LICENSE.md file that was distributed with this source code.
*/

use FluidTYPO3\Flux\Provider\ContentProvider;
use FluidTYPO3\Flux\Provider\Interfaces\RecordProviderInterface;
use FluidTYPO3\Flux\Provider\PageProvider;
use FluidTYPO3\Flux\Provider\Provider;
Expand All @@ -33,7 +32,7 @@ public function testResolveConfigurationProvidersFiltersProviders(): void
$subject->method('loadTypoScriptConfigurationProviderInstances')->willReturn([]);
$subject->method('validateAndInstantiateProviders')->willReturnArgument(0);

$provider1 = $this->getMockBuilder(ContentProvider::class)->disableOriginalConstructor()->getMock();
$provider1 = $this->getMockBuilder(DummyConfigurationProvider::class)->disableOriginalConstructor()->getMock();
$provider2 = $this->getMockBuilder(PageProvider::class)->disableOriginalConstructor()->getMock();
$provider3 = $this->getMockBuilder(DummyBasicProvider::class)->disableOriginalConstructor()->getMock();

Expand Down Expand Up @@ -61,9 +60,9 @@ public function loadTypoScriptProvidersReturnsEmptyArrayEarlyIfSetupNotFound()
->disableOriginalConstructor()
->getMock();
$configurationService->expects($this->once())->method('getTypoScriptByPath')->will($this->returnValue([]));
GeneralUtility::setSingletonInstance(FluxService::class, $configurationService);

$instance = new ProviderResolver();
$instance = $this->getMockBuilder(ProviderResolver::class)->onlyMethods(['getFluxService'])->getMock();
$instance->method('getFluxService')->willReturn($configurationService);

$providers = $instance->loadTypoScriptConfigurationProviderInstances();
$this->assertIsArray($providers);
Expand All @@ -89,10 +88,9 @@ public function loadTypoScriptProvidersSupportsCustomClassName()
->method('getTypoScriptByPath')
->willReturn($mockedTypoScript);

GeneralUtility::setSingletonInstance(FluxService::class, $configurationService);

/** @var \FluidTYPO3\Flux\Provider\ProviderResolver $instance */
$instance = new ProviderResolver();
$instance = $this->getMockBuilder(ProviderResolver::class)->onlyMethods(['getFluxService'])->getMock();
$instance->method('getFluxService')->willReturn($configurationService);

$dummyProvider = $this->getMockBuilder(DummyConfigurationProvider::class)->disableOriginalConstructor()->getMock();
GeneralUtility::addInstance(DummyConfigurationProvider::class, $dummyProvider);
Expand Down

0 comments on commit b37aafb

Please sign in to comment.