diff --git a/Tests/Functional/ImportTest.php b/Tests/Functional/ImportTest.php index 2ea1fc0..b3bbe47 100644 --- a/Tests/Functional/ImportTest.php +++ b/Tests/Functional/ImportTest.php @@ -33,42 +33,44 @@ use TYPO3\CMS\Extbase\Core\Bootstrap; use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase as TestCase; /** - * @covers WerkraumMedia\ThueCat\Controller\Backend\AbstractController - * @covers WerkraumMedia\ThueCat\Controller\Backend\ImportController - * @covers WerkraumMedia\ThueCat\DependencyInjection\ConverterPass - * @covers WerkraumMedia\ThueCat\DependencyInjection\UrlProvidersPass - * @covers WerkraumMedia\ThueCat\Domain\Import\Importer\SaveData - * @covers WerkraumMedia\ThueCat\Domain\Repository\Backend\ImportLogRepository - * @covers WerkraumMedia\ThueCat\Domain\Repository\Backend\OrganisationRepository - * @covers WerkraumMedia\ThueCat\Domain\Repository\Backend\TownRepository - * @covers WerkraumMedia\ThueCat\Extension - * @covers WerkraumMedia\ThueCat\Typo3Wrapper\TranslationService - * @covers WerkraumMedia\ThueCat\View\Backend\Menu + * @covers \WerkraumMedia\ThueCat\Controller\Backend\AbstractController + * @covers \WerkraumMedia\ThueCat\Controller\Backend\ImportController + * @covers \WerkraumMedia\ThueCat\DependencyInjection\ConverterPass + * @covers \WerkraumMedia\ThueCat\DependencyInjection\UrlProvidersPass + * @covers \WerkraumMedia\ThueCat\Domain\Import\Importer\SaveData + * @covers \WerkraumMedia\ThueCat\Domain\Repository\Backend\ImportLogRepository + * @covers \WerkraumMedia\ThueCat\Domain\Repository\Backend\OrganisationRepository + * @covers \WerkraumMedia\ThueCat\Domain\Repository\Backend\TownRepository + * @covers \WerkraumMedia\ThueCat\Extension + * @covers \WerkraumMedia\ThueCat\Typo3Wrapper\TranslationService + * @covers \WerkraumMedia\ThueCat\View\Backend\Menu * - * @uses WerkraumMedia\ThueCat\Domain\Import\Converter\Organisation - * @uses WerkraumMedia\ThueCat\Domain\Import\Converter\Registry - * @uses WerkraumMedia\ThueCat\Domain\Import\Converter\TouristAttraction - * @uses WerkraumMedia\ThueCat\Domain\Import\Converter\TouristInformation - * @uses WerkraumMedia\ThueCat\Domain\Import\Converter\Town - * @uses WerkraumMedia\ThueCat\Domain\Import\Importer - * @uses WerkraumMedia\ThueCat\Domain\Import\Importer\FetchData - * @uses WerkraumMedia\ThueCat\Domain\Import\Importer\LanguageHandling - * @uses WerkraumMedia\ThueCat\Domain\Import\JsonLD\Parser - * @uses WerkraumMedia\ThueCat\Domain\Import\JsonLD\Parser\Address - * @uses WerkraumMedia\ThueCat\Domain\Import\JsonLD\Parser\GenericFields - * @uses WerkraumMedia\ThueCat\Domain\Import\JsonLD\Parser\LanguageValues - * @uses WerkraumMedia\ThueCat\Domain\Import\JsonLD\Parser\Media - * @uses WerkraumMedia\ThueCat\Domain\Import\JsonLD\Parser\Offers - * @uses WerkraumMedia\ThueCat\Domain\Import\JsonLD\Parser\OpeningHours - * @uses WerkraumMedia\ThueCat\Domain\Import\JsonLD\Parser\OpeningHours - * @uses WerkraumMedia\ThueCat\Domain\Import\Model\EntityCollection - * @uses WerkraumMedia\ThueCat\Domain\Import\Model\GenericEntity - * @uses WerkraumMedia\ThueCat\Domain\Import\RequestFactory - * @uses WerkraumMedia\ThueCat\Domain\Import\UrlProvider\Registry - * @uses WerkraumMedia\ThueCat\Domain\Import\UrlProvider\StaticUrlProvider - * @uses WerkraumMedia\ThueCat\Domain\Model\Backend\ImportConfiguration - * @uses WerkraumMedia\ThueCat\Domain\Model\Backend\ImportLog - * @uses WerkraumMedia\ThueCat\Domain\Model\Backend\ImportLogEntry + * @uses \WerkraumMedia\ThueCat\Domain\Import\Converter\Organisation + * @uses \WerkraumMedia\ThueCat\Domain\Import\Converter\Registry + * @uses \WerkraumMedia\ThueCat\Domain\Import\Converter\TouristAttraction + * @uses \WerkraumMedia\ThueCat\Domain\Import\Converter\TouristInformation + * @uses \WerkraumMedia\ThueCat\Domain\Import\Converter\Town + * @uses \WerkraumMedia\ThueCat\Domain\Import\Importer + * @uses \WerkraumMedia\ThueCat\Domain\Import\Importer\FetchData + * @uses \WerkraumMedia\ThueCat\Domain\Import\Importer\LanguageHandling + * @uses \WerkraumMedia\ThueCat\Domain\Import\JsonLD\Parser + * @uses \WerkraumMedia\ThueCat\Domain\Import\JsonLD\Parser\Address + * @uses \WerkraumMedia\ThueCat\Domain\Import\JsonLD\Parser\GenericFields + * @uses \WerkraumMedia\ThueCat\Domain\Import\JsonLD\Parser\LanguageValues + * @uses \WerkraumMedia\ThueCat\Domain\Import\JsonLD\Parser\Media + * @uses \WerkraumMedia\ThueCat\Domain\Import\JsonLD\Parser\Offers + * @uses \WerkraumMedia\ThueCat\Domain\Import\JsonLD\Parser\OpeningHours + * @uses \WerkraumMedia\ThueCat\Domain\Import\JsonLD\Parser\OpeningHours + * @uses \WerkraumMedia\ThueCat\Domain\Import\Model\EntityCollection + * @uses \WerkraumMedia\ThueCat\Domain\Import\Model\GenericEntity + * @uses \WerkraumMedia\ThueCat\Domain\Import\RequestFactory + * @uses \WerkraumMedia\ThueCat\Domain\Import\UrlProvider\Registry + * @uses \WerkraumMedia\ThueCat\Domain\Import\UrlProvider\StaticUrlProvider + * @uses \WerkraumMedia\ThueCat\Domain\Import\UrlProvider\SyncScopeUrlProvider + * @uses \WerkraumMedia\ThueCat\Domain\Model\Backend\ImportConfiguration + * @uses \WerkraumMedia\ThueCat\Domain\Model\Backend\ImportLog + * @uses \WerkraumMedia\ThueCat\Domain\Model\Backend\ImportLogEntry + * @uses \WerkraumMedia\ThueCat\Domain\Model\Backend\ImportLogEntry * * @testdox The import */ diff --git a/Tests/Unit/Domain/Import/Converter/OrganisationTest.php b/Tests/Unit/Domain/Import/Converter/OrganisationTest.php index 0a095af..74fdfe9 100644 --- a/Tests/Unit/Domain/Import/Converter/OrganisationTest.php +++ b/Tests/Unit/Domain/Import/Converter/OrganisationTest.php @@ -34,9 +34,10 @@ use WerkraumMedia\ThueCat\Domain\Import\Model\EntityCollection; use WerkraumMedia\ThueCat\Domain\Model\Backend\ImportConfiguration; /** - * @covers WerkraumMedia\ThueCat\Domain\Import\Converter\Organisation - * @uses WerkraumMedia\ThueCat\Domain\Import\Model\EntityCollection - * @uses WerkraumMedia\ThueCat\Domain\Import\Model\GenericEntity + * @covers \WerkraumMedia\ThueCat\Domain\Import\Converter\Organisation + * + * @uses \WerkraumMedia\ThueCat\Domain\Import\Model\EntityCollection + * @uses \WerkraumMedia\ThueCat\Domain\Import\Model\GenericEntity */ class OrganisationTest extends TestCase { diff --git a/Tests/Unit/Domain/Import/Converter/RegistryTest.php b/Tests/Unit/Domain/Import/Converter/RegistryTest.php index db80691..ab78821 100644 --- a/Tests/Unit/Domain/Import/Converter/RegistryTest.php +++ b/Tests/Unit/Domain/Import/Converter/RegistryTest.php @@ -29,7 +29,7 @@ use WerkraumMedia\ThueCat\Domain\Import\Converter\Converter; use WerkraumMedia\ThueCat\Domain\Import\Converter\Registry; /** - * @covers WerkraumMedia\ThueCat\Domain\Import\Converter\Registry + * @covers \WerkraumMedia\ThueCat\Domain\Import\Converter\Registry */ class RegistryTest extends TestCase { diff --git a/Tests/Unit/Domain/Import/Converter/TouristAttractionTest.php b/Tests/Unit/Domain/Import/Converter/TouristAttractionTest.php index 1c60584..7229fc9 100644 --- a/Tests/Unit/Domain/Import/Converter/TouristAttractionTest.php +++ b/Tests/Unit/Domain/Import/Converter/TouristAttractionTest.php @@ -38,9 +38,10 @@ use WerkraumMedia\ThueCat\Domain\Repository\Backend\OrganisationRepository; use WerkraumMedia\ThueCat\Domain\Repository\Backend\TownRepository; /** - * @covers WerkraumMedia\ThueCat\Domain\Import\Converter\TouristAttraction - * @uses WerkraumMedia\ThueCat\Domain\Import\Model\EntityCollection - * @uses WerkraumMedia\ThueCat\Domain\Import\Model\GenericEntity + * @covers \WerkraumMedia\ThueCat\Domain\Import\Converter\TouristAttraction + * + * @uses \WerkraumMedia\ThueCat\Domain\Import\Model\EntityCollection + * @uses \WerkraumMedia\ThueCat\Domain\Import\Model\GenericEntity */ class TouristAttractionTest extends TestCase { diff --git a/Tests/Unit/Domain/Import/Converter/TouristInformationTest.php b/Tests/Unit/Domain/Import/Converter/TouristInformationTest.php index 1170029..379609a 100644 --- a/Tests/Unit/Domain/Import/Converter/TouristInformationTest.php +++ b/Tests/Unit/Domain/Import/Converter/TouristInformationTest.php @@ -38,9 +38,10 @@ use WerkraumMedia\ThueCat\Domain\Repository\Backend\OrganisationRepository; use WerkraumMedia\ThueCat\Domain\Repository\Backend\TownRepository; /** - * @covers WerkraumMedia\ThueCat\Domain\Import\Converter\TouristInformation - * @uses WerkraumMedia\ThueCat\Domain\Import\Model\EntityCollection - * @uses WerkraumMedia\ThueCat\Domain\Import\Model\GenericEntity + * @covers \WerkraumMedia\ThueCat\Domain\Import\Converter\TouristInformation + * + * @uses \WerkraumMedia\ThueCat\Domain\Import\Model\EntityCollection + * @uses \WerkraumMedia\ThueCat\Domain\Import\Model\GenericEntity */ class TouristInformationTest extends TestCase { diff --git a/Tests/Unit/Domain/Import/Converter/TownTest.php b/Tests/Unit/Domain/Import/Converter/TownTest.php index 222f282..fa0dccc 100644 --- a/Tests/Unit/Domain/Import/Converter/TownTest.php +++ b/Tests/Unit/Domain/Import/Converter/TownTest.php @@ -36,9 +36,10 @@ use WerkraumMedia\ThueCat\Domain\Model\Backend\Organisation; use WerkraumMedia\ThueCat\Domain\Repository\Backend\OrganisationRepository; /** - * @covers WerkraumMedia\ThueCat\Domain\Import\Converter\Town - * @uses WerkraumMedia\ThueCat\Domain\Import\Model\EntityCollection - * @uses WerkraumMedia\ThueCat\Domain\Import\Model\GenericEntity + * @covers \WerkraumMedia\ThueCat\Domain\Import\Converter\Town + * + * @uses \WerkraumMedia\ThueCat\Domain\Import\Model\EntityCollection + * @uses \WerkraumMedia\ThueCat\Domain\Import\Model\GenericEntity */ class TownTest extends TestCase { diff --git a/Tests/Unit/Domain/Import/Importer/FetchDataTest.php b/Tests/Unit/Domain/Import/Importer/FetchDataTest.php index 1276017..b226840 100644 --- a/Tests/Unit/Domain/Import/Importer/FetchDataTest.php +++ b/Tests/Unit/Domain/Import/Importer/FetchDataTest.php @@ -34,7 +34,7 @@ use WerkraumMedia\ThueCat\Domain\Import\Importer\FetchData; use WerkraumMedia\ThueCat\Domain\Import\Importer\FetchData\InvalidResponseException; /** - * @covers WerkraumMedia\ThueCat\Domain\Import\Importer\FetchData + * @covers \WerkraumMedia\ThueCat\Domain\Import\Importer\FetchData */ class FetchDataTest extends TestCase { diff --git a/Tests/Unit/Domain/Import/Importer/LanguageHandlingTest.php b/Tests/Unit/Domain/Import/Importer/LanguageHandlingTest.php index 07c7aca..8bd73a2 100644 --- a/Tests/Unit/Domain/Import/Importer/LanguageHandlingTest.php +++ b/Tests/Unit/Domain/Import/Importer/LanguageHandlingTest.php @@ -29,7 +29,7 @@ use TYPO3\CMS\Core\Site\SiteFinder; use WerkraumMedia\ThueCat\Domain\Import\Importer\LanguageHandling; /** - * @covers WerkraumMedia\ThueCat\Domain\Import\Importer\LanguageHandling + * @covers \WerkraumMedia\ThueCat\Domain\Import\Importer\LanguageHandling */ class LanguageHandlingTest extends TestCase { diff --git a/Tests/Unit/Domain/Import/ImporterTest.php b/Tests/Unit/Domain/Import/ImporterTest.php index 1f52593..3fdece9 100644 --- a/Tests/Unit/Domain/Import/ImporterTest.php +++ b/Tests/Unit/Domain/Import/ImporterTest.php @@ -39,8 +39,8 @@ use WerkraumMedia\ThueCat\Domain\Model\Backend\ImportLog; use WerkraumMedia\ThueCat\Domain\Repository\Backend\ImportLogRepository; /** - * @covers WerkraumMedia\ThueCat\Domain\Import\Importer - * @uses WerkraumMedia\ThueCat\Domain\Model\Backend\ImportLog + * @covers \WerkraumMedia\ThueCat\Domain\Import\Importer + * @uses \WerkraumMedia\ThueCat\Domain\Model\Backend\ImportLog */ class ImporterTest extends TestCase { diff --git a/Tests/Unit/Domain/Import/JsonLD/Parser/AddressTest.php b/Tests/Unit/Domain/Import/JsonLD/Parser/AddressTest.php index 89577b3..64fe3e4 100644 --- a/Tests/Unit/Domain/Import/JsonLD/Parser/AddressTest.php +++ b/Tests/Unit/Domain/Import/JsonLD/Parser/AddressTest.php @@ -25,7 +25,7 @@ use PHPUnit\Framework\TestCase; use WerkraumMedia\ThueCat\Domain\Import\JsonLD\Parser\Address; /** - * @covers WerkraumMedia\ThueCat\Domain\Import\JsonLD\Parser\Address + * @covers \WerkraumMedia\ThueCat\Domain\Import\JsonLD\Parser\Address */ class AddressTest extends TestCase { diff --git a/Tests/Unit/Domain/Import/JsonLD/Parser/GenericFieldsTest.php b/Tests/Unit/Domain/Import/JsonLD/Parser/GenericFieldsTest.php index b8c6a7c..16e19ea 100644 --- a/Tests/Unit/Domain/Import/JsonLD/Parser/GenericFieldsTest.php +++ b/Tests/Unit/Domain/Import/JsonLD/Parser/GenericFieldsTest.php @@ -28,7 +28,7 @@ use WerkraumMedia\ThueCat\Domain\Import\JsonLD\Parser\GenericFields; use WerkraumMedia\ThueCat\Domain\Import\JsonLD\Parser\LanguageValues; /** - * @covers WerkraumMedia\ThueCat\Domain\Import\JsonLD\Parser\GenericFields + * @covers \WerkraumMedia\ThueCat\Domain\Import\JsonLD\Parser\GenericFields */ class GenericFieldsTest extends TestCase { diff --git a/Tests/Unit/Domain/Import/JsonLD/Parser/LanguageValuesTest.php b/Tests/Unit/Domain/Import/JsonLD/Parser/LanguageValuesTest.php index 5c985f0..78f8aa5 100644 --- a/Tests/Unit/Domain/Import/JsonLD/Parser/LanguageValuesTest.php +++ b/Tests/Unit/Domain/Import/JsonLD/Parser/LanguageValuesTest.php @@ -27,7 +27,7 @@ use TYPO3\CMS\Core\Site\Entity\SiteLanguage; use WerkraumMedia\ThueCat\Domain\Import\JsonLD\Parser\LanguageValues; /** - * @covers WerkraumMedia\ThueCat\Domain\Import\JsonLD\Parser\LanguageValues + * @covers \WerkraumMedia\ThueCat\Domain\Import\JsonLD\Parser\LanguageValues */ class LanguageValuesTest extends TestCase { diff --git a/Tests/Unit/Domain/Import/JsonLD/Parser/MediaTest.php b/Tests/Unit/Domain/Import/JsonLD/Parser/MediaTest.php index da8f285..30fa817 100644 --- a/Tests/Unit/Domain/Import/JsonLD/Parser/MediaTest.php +++ b/Tests/Unit/Domain/Import/JsonLD/Parser/MediaTest.php @@ -27,7 +27,7 @@ use WerkraumMedia\ThueCat\Domain\Import\Importer\FetchData; use WerkraumMedia\ThueCat\Domain\Import\JsonLD\Parser\Media; /** - * @covers WerkraumMedia\ThueCat\Domain\Import\JsonLD\Parser\Media + * @covers \WerkraumMedia\ThueCat\Domain\Import\JsonLD\Parser\Media */ class MediaTest extends TestCase { diff --git a/Tests/Unit/Domain/Import/JsonLD/Parser/OffersTest.php b/Tests/Unit/Domain/Import/JsonLD/Parser/OffersTest.php index 126f6e1..8beaefa 100644 --- a/Tests/Unit/Domain/Import/JsonLD/Parser/OffersTest.php +++ b/Tests/Unit/Domain/Import/JsonLD/Parser/OffersTest.php @@ -28,7 +28,7 @@ use WerkraumMedia\ThueCat\Domain\Import\JsonLD\Parser\GenericFields; use WerkraumMedia\ThueCat\Domain\Import\JsonLD\Parser\Offers; /** - * @covers WerkraumMedia\ThueCat\Domain\Import\JsonLD\Parser\Offers + * @covers \WerkraumMedia\ThueCat\Domain\Import\JsonLD\Parser\Offers */ class OffersTest extends TestCase { diff --git a/Tests/Unit/Domain/Import/JsonLD/Parser/OpeningHoursTest.php b/Tests/Unit/Domain/Import/JsonLD/Parser/OpeningHoursTest.php index e95df5f..4bd2e93 100644 --- a/Tests/Unit/Domain/Import/JsonLD/Parser/OpeningHoursTest.php +++ b/Tests/Unit/Domain/Import/JsonLD/Parser/OpeningHoursTest.php @@ -27,7 +27,7 @@ use PHPUnit\Framework\TestCase; use WerkraumMedia\ThueCat\Domain\Import\JsonLD\Parser\OpeningHours; /** - * @covers WerkraumMedia\ThueCat\Domain\Import\JsonLD\Parser\OpeningHours + * @covers \WerkraumMedia\ThueCat\Domain\Import\JsonLD\Parser\OpeningHours */ class OpeningHoursTest extends TestCase { diff --git a/Tests/Unit/Domain/Import/JsonLD/ParserTest.php b/Tests/Unit/Domain/Import/JsonLD/ParserTest.php index 0a30b36..360b36a 100644 --- a/Tests/Unit/Domain/Import/JsonLD/ParserTest.php +++ b/Tests/Unit/Domain/Import/JsonLD/ParserTest.php @@ -33,7 +33,7 @@ use WerkraumMedia\ThueCat\Domain\Import\JsonLD\Parser\Media; use WerkraumMedia\ThueCat\Domain\Import\JsonLD\Parser\OpeningHours; /** - * @covers WerkraumMedia\ThueCat\Domain\Import\JsonLD\Parser + * @covers \WerkraumMedia\ThueCat\Domain\Import\JsonLD\Parser */ class ParserTest extends TestCase { diff --git a/Tests/Unit/Domain/Import/Model/EntityCollectionTest.php b/Tests/Unit/Domain/Import/Model/EntityCollectionTest.php index d71848c..0a6532c 100644 --- a/Tests/Unit/Domain/Import/Model/EntityCollectionTest.php +++ b/Tests/Unit/Domain/Import/Model/EntityCollectionTest.php @@ -29,7 +29,7 @@ use WerkraumMedia\ThueCat\Domain\Import\Model\Entity; use WerkraumMedia\ThueCat\Domain\Import\Model\EntityCollection; /** - * @covers WerkraumMedia\ThueCat\Domain\Import\Model\EntityCollection + * @covers \WerkraumMedia\ThueCat\Domain\Import\Model\EntityCollection */ class EntityCollectionTest extends TestCase { diff --git a/Tests/Unit/Domain/Import/Model/GenericEntityTest.php b/Tests/Unit/Domain/Import/Model/GenericEntityTest.php index bfd86ab..e02cf20 100644 --- a/Tests/Unit/Domain/Import/Model/GenericEntityTest.php +++ b/Tests/Unit/Domain/Import/Model/GenericEntityTest.php @@ -27,7 +27,7 @@ use PHPUnit\Framework\TestCase; use WerkraumMedia\ThueCat\Domain\Import\Model\GenericEntity; /** - * @covers WerkraumMedia\ThueCat\Domain\Import\Model\GenericEntity + * @covers \WerkraumMedia\ThueCat\Domain\Import\Model\GenericEntity */ class GenericEntityTest extends TestCase { diff --git a/Tests/Unit/Domain/Import/RequestFactoryTest.php b/Tests/Unit/Domain/Import/RequestFactoryTest.php index 9053338..bc5a4f2 100644 --- a/Tests/Unit/Domain/Import/RequestFactoryTest.php +++ b/Tests/Unit/Domain/Import/RequestFactoryTest.php @@ -30,7 +30,7 @@ use TYPO3\CMS\Core\Configuration\ExtensionConfiguration; use WerkraumMedia\ThueCat\Domain\Import\RequestFactory; /** - * @covers WerkraumMedia\ThueCat\Domain\Import\RequestFactory + * @covers \WerkraumMedia\ThueCat\Domain\Import\RequestFactory */ class RequestFactoryTest extends TestCase { diff --git a/Tests/Unit/Domain/Import/UrlProvider/RegistryTest.php b/Tests/Unit/Domain/Import/UrlProvider/RegistryTest.php index 8d245d4..0d02a8a 100644 --- a/Tests/Unit/Domain/Import/UrlProvider/RegistryTest.php +++ b/Tests/Unit/Domain/Import/UrlProvider/RegistryTest.php @@ -30,7 +30,7 @@ use WerkraumMedia\ThueCat\Domain\Import\UrlProvider\UrlProvider; use WerkraumMedia\ThueCat\Domain\Model\Backend\ImportConfiguration; /** - * @covers WerkraumMedia\ThueCat\Domain\Import\UrlProvider\Registry + * @covers \WerkraumMedia\ThueCat\Domain\Import\UrlProvider\Registry */ class RegistryTest extends TestCase { diff --git a/Tests/Unit/Domain/Import/UrlProvider/StaticUrlProviderTest.php b/Tests/Unit/Domain/Import/UrlProvider/StaticUrlProviderTest.php index 7d32da0..d278088 100644 --- a/Tests/Unit/Domain/Import/UrlProvider/StaticUrlProviderTest.php +++ b/Tests/Unit/Domain/Import/UrlProvider/StaticUrlProviderTest.php @@ -29,7 +29,7 @@ use WerkraumMedia\ThueCat\Domain\Import\UrlProvider\StaticUrlProvider; use WerkraumMedia\ThueCat\Domain\Model\Backend\ImportConfiguration; /** - * @covers WerkraumMedia\ThueCat\Domain\Import\UrlProvider\StaticUrlProvider + * @covers \WerkraumMedia\ThueCat\Domain\Import\UrlProvider\StaticUrlProvider */ class StaticUrlProviderTest extends TestCase { @@ -50,7 +50,6 @@ class StaticUrlProviderTest extends TestCase public function canProvideForStaticConfiguration(): void { $configuration = $this->prophesize(ImportConfiguration::class); - $configuration->getUrls()->willReturn([]); $configuration->getType()->willReturn('static'); $subject = new StaticUrlProvider(); @@ -70,7 +69,7 @@ class StaticUrlProviderTest extends TestCase $subject = new StaticUrlProvider(); $result = $subject->createWithConfiguration($configuration->reveal()); - self::assertInstanceOf(StaticUrlProvider::class, $subject); + self::assertInstanceOf(StaticUrlProvider::class, $result); } /** diff --git a/Tests/Unit/Domain/Import/UrlProvider/SyncScopeUrlProviderTest.php b/Tests/Unit/Domain/Import/UrlProvider/SyncScopeUrlProviderTest.php new file mode 100644 index 0000000..9c0b7f0 --- /dev/null +++ b/Tests/Unit/Domain/Import/UrlProvider/SyncScopeUrlProviderTest.php @@ -0,0 +1,127 @@ + + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301, USA. + */ + +use Prophecy\PhpUnit\ProphecyTrait; +use WerkraumMedia\ThueCat\Domain\Import\Importer\FetchData; +use WerkraumMedia\ThueCat\Domain\Import\UrlProvider\SyncScopeUrlProvider; +use PHPUnit\Framework\TestCase; +use WerkraumMedia\ThueCat\Domain\Model\Backend\ImportConfiguration; + +/** + * @covers \WerkraumMedia\ThueCat\Domain\Import\UrlProvider\SyncScopeUrlProvider + */ +class SyncScopeUrlProviderTest extends TestCase +{ + use ProphecyTrait; + + /** + * @test + */ + public function canBeCreated(): void + { + $fetchData = $this->prophesize(FetchData::class); + + $subject = new SyncScopeUrlProvider( + $fetchData->reveal() + ); + + self::assertInstanceOf(SyncScopeUrlProvider::class, $subject); + } + + /** + * @test + */ + public function canProvideForSyncScope(): void + { + $configuration = $this->prophesize(ImportConfiguration::class); + $configuration->getType()->willReturn('syncScope'); + + $fetchData = $this->prophesize(FetchData::class); + + $subject = new SyncScopeUrlProvider( + $fetchData->reveal() + ); + + $result = $subject->canProvideForConfiguration($configuration->reveal()); + self::assertTrue($result); + } + + /** + * @test + */ + public function returnsConcreteProviderForConfiguration(): void + { + $configuration = $this->prophesize(ImportConfiguration::class); + $configuration->getSyncScopeId()->willReturn(10); + + $fetchData = $this->prophesize(FetchData::class); + $fetchData->updatedNodes(10)->willReturn([ + 'data' => [ + 'canBeCreated' => [ + '835224016581-dara', + '165868194223-zmqf', + ], + ], + ]); + + $subject = new SyncScopeUrlProvider( + $fetchData->reveal() + ); + + $result = $subject->createWithConfiguration($configuration->reveal()); + + self::assertInstanceOf(SyncScopeUrlProvider::class, $result); + } + + /** + * @test + */ + public function concreteProviderReturnsUrls(): void + { + $configuration = $this->prophesize(ImportConfiguration::class); + $configuration->getSyncScopeId()->willReturn(10); + + $fetchData = $this->prophesize(FetchData::class); + $fetchData->getResourceEndpoint()->willReturn('https://example.com/api/'); + $fetchData->updatedNodes(10)->willReturn([ + 'data' => [ + 'createdOrUpdated' => [ + '835224016581-dara', + '165868194223-zmqf', + ], + ], + ]); + + $subject = new SyncScopeUrlProvider( + $fetchData->reveal() + ); + + $concreteProvider = $subject->createWithConfiguration($configuration->reveal()); + $result = $concreteProvider->getUrls(); + + self::assertSame([ + 'https://example.com/api/835224016581-dara', + 'https://example.com/api/165868194223-zmqf', + ], $result); + } +} diff --git a/Tests/Unit/Domain/Model/Frontend/AddressTest.php b/Tests/Unit/Domain/Model/Frontend/AddressTest.php index 9d112a1..221b366 100644 --- a/Tests/Unit/Domain/Model/Frontend/AddressTest.php +++ b/Tests/Unit/Domain/Model/Frontend/AddressTest.php @@ -25,7 +25,7 @@ use PHPUnit\Framework\TestCase; use WerkraumMedia\ThueCat\Domain\Model\Frontend\Address; /** - * @covers WerkraumMedia\ThueCat\Domain\Model\Frontend\Address + * @covers \WerkraumMedia\ThueCat\Domain\Model\Frontend\Address */ class AddressTest extends TestCase { diff --git a/Tests/Unit/Domain/Model/Frontend/MediaTest.php b/Tests/Unit/Domain/Model/Frontend/MediaTest.php index a300f3c..328c78b 100644 --- a/Tests/Unit/Domain/Model/Frontend/MediaTest.php +++ b/Tests/Unit/Domain/Model/Frontend/MediaTest.php @@ -25,7 +25,7 @@ use PHPUnit\Framework\TestCase; use WerkraumMedia\ThueCat\Domain\Model\Frontend\Media; /** - * @covers WerkraumMedia\ThueCat\Domain\Model\Frontend\Media + * @covers \WerkraumMedia\ThueCat\Domain\Model\Frontend\Media */ class MediaTest extends TestCase { diff --git a/Tests/Unit/Domain/Model/Frontend/OffersTest.php b/Tests/Unit/Domain/Model/Frontend/OffersTest.php index 60c9939..6e929a3 100644 --- a/Tests/Unit/Domain/Model/Frontend/OffersTest.php +++ b/Tests/Unit/Domain/Model/Frontend/OffersTest.php @@ -27,7 +27,11 @@ use PHPUnit\Framework\TestCase; use WerkraumMedia\ThueCat\Domain\Model\Frontend\Offers; /** - * @covers WerkraumMedia\ThueCat\Domain\Model\Frontend\Offers + * @covers \WerkraumMedia\ThueCat\Domain\Model\Frontend\Offers + * + * @uses \WerkraumMedia\ThueCat\Domain\Model\Frontend\Offer + * @uses \WerkraumMedia\ThueCat\Domain\Model\Frontend\Price + * * @testdox Frontend model for offers */ class OffersTest extends TestCase diff --git a/Tests/Unit/Domain/Model/Frontend/OpeningHoursTest.php b/Tests/Unit/Domain/Model/Frontend/OpeningHoursTest.php index d1e0dcf..d648988 100644 --- a/Tests/Unit/Domain/Model/Frontend/OpeningHoursTest.php +++ b/Tests/Unit/Domain/Model/Frontend/OpeningHoursTest.php @@ -27,7 +27,10 @@ use PHPUnit\Framework\TestCase; use WerkraumMedia\ThueCat\Domain\Model\Frontend\OpeningHours; /** - * @covers WerkraumMedia\ThueCat\Domain\Model\Frontend\OpeningHours + * @covers \WerkraumMedia\ThueCat\Domain\Model\Frontend\OpeningHours + * + * @uses \WerkraumMedia\ThueCat\Domain\Model\Frontend\OpeningHour + * * @testdox Frontend model for offers */ class OpeningHoursTest extends TestCase diff --git a/Tests/Unit/ExtensionTest.php b/Tests/Unit/ExtensionTest.php index fe8239d..492bc49 100644 --- a/Tests/Unit/ExtensionTest.php +++ b/Tests/Unit/ExtensionTest.php @@ -27,7 +27,7 @@ use PHPUnit\Framework\TestCase; use WerkraumMedia\ThueCat\Extension; /** - * @covers WerkraumMedia\ThueCat\Extension + * @covers \WerkraumMedia\ThueCat\Extension * @testdox The extension class */ class ExtensionTest extends TestCase