Browse Source

Fix @covers and @uses annotations within tests

Always use `\` prefix as best practice.
Add missing new classes.
pull/31/head
Daniel Siepmann 1 year ago
parent
commit
9cfb0fdb3a
  1. 72
      Tests/Functional/ImportTest.php
  2. 7
      Tests/Unit/Domain/Import/Converter/OrganisationTest.php
  3. 2
      Tests/Unit/Domain/Import/Converter/RegistryTest.php
  4. 7
      Tests/Unit/Domain/Import/Converter/TouristAttractionTest.php
  5. 7
      Tests/Unit/Domain/Import/Converter/TouristInformationTest.php
  6. 7
      Tests/Unit/Domain/Import/Converter/TownTest.php
  7. 2
      Tests/Unit/Domain/Import/Importer/FetchDataTest.php
  8. 2
      Tests/Unit/Domain/Import/Importer/LanguageHandlingTest.php
  9. 4
      Tests/Unit/Domain/Import/ImporterTest.php
  10. 2
      Tests/Unit/Domain/Import/JsonLD/Parser/AddressTest.php
  11. 2
      Tests/Unit/Domain/Import/JsonLD/Parser/GenericFieldsTest.php
  12. 2
      Tests/Unit/Domain/Import/JsonLD/Parser/LanguageValuesTest.php
  13. 2
      Tests/Unit/Domain/Import/JsonLD/Parser/MediaTest.php
  14. 2
      Tests/Unit/Domain/Import/JsonLD/Parser/OffersTest.php
  15. 2
      Tests/Unit/Domain/Import/JsonLD/Parser/OpeningHoursTest.php
  16. 2
      Tests/Unit/Domain/Import/JsonLD/ParserTest.php
  17. 2
      Tests/Unit/Domain/Import/Model/EntityCollectionTest.php
  18. 2
      Tests/Unit/Domain/Import/Model/GenericEntityTest.php
  19. 2
      Tests/Unit/Domain/Import/RequestFactoryTest.php
  20. 2
      Tests/Unit/Domain/Import/UrlProvider/RegistryTest.php
  21. 5
      Tests/Unit/Domain/Import/UrlProvider/StaticUrlProviderTest.php
  22. 127
      Tests/Unit/Domain/Import/UrlProvider/SyncScopeUrlProviderTest.php
  23. 2
      Tests/Unit/Domain/Model/Frontend/AddressTest.php
  24. 2
      Tests/Unit/Domain/Model/Frontend/MediaTest.php
  25. 6
      Tests/Unit/Domain/Model/Frontend/OffersTest.php
  26. 5
      Tests/Unit/Domain/Model/Frontend/OpeningHoursTest.php
  27. 2
      Tests/Unit/ExtensionTest.php

72
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
*/

7
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
{

2
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
{

7
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
{

7
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
{

7
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
{

2
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
{

2
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
{

4
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
{

2
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
{

2
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
{

2
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
{

2
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
{

2
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
{

2
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
{

2
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
{

2
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
{

2
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
{

2
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
{

2
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
{

5
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);
}
/**

127
Tests/Unit/Domain/Import/UrlProvider/SyncScopeUrlProviderTest.php

@ -0,0 +1,127 @@
<?php
namespace WerkraumMedia\ThueCat\Tests\Unit\Domain\Import\UrlProvider;
/*
* Copyright (C) 2021 Daniel Siepmann <coding@daniel-siepmann.de>
*
* 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);
}
}

2
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
{

2
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
{

6
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

5
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

2
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

Loading…
Cancel
Save