Switch to TYPO3 testing framework base

Now that all incompatibilities are resolved, we can use the testing
framework of TYPO3.
This commit is contained in:
Daniel Siepmann 2020-10-05 08:28:14 +02:00
parent 14c2c5e915
commit 101d2fb3e4
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4
7 changed files with 6 additions and 25 deletions

View file

@ -21,22 +21,19 @@ namespace SkillDisplay\Typo3Extension\Tests\Unit\Backend;
* 02110-1301, USA. * 02110-1301, USA.
*/ */
use PHPUnit\Framework\TestCase;
use Prophecy\PhpUnit\ProphecyTrait;
use SkillDisplay\PHPToolKit\Api\Skill; use SkillDisplay\PHPToolKit\Api\Skill;
use SkillDisplay\PHPToolKit\Api\SkillSet; use SkillDisplay\PHPToolKit\Api\SkillSet;
use SkillDisplay\PHPToolKit\Entity\Skill as SkillEntity; use SkillDisplay\PHPToolKit\Entity\Skill as SkillEntity;
use SkillDisplay\PHPToolKit\Entity\SkillSet as SkillSetEntity; use SkillDisplay\PHPToolKit\Entity\SkillSet as SkillSetEntity;
use SkillDisplay\Typo3Extension\Backend\Preview; use SkillDisplay\Typo3Extension\Backend\Preview;
use TYPO3\CMS\Backend\View\PageLayoutView; use TYPO3\CMS\Backend\View\PageLayoutView;
use TYPO3\TestingFramework\Core\Unit\UnitTestCase as TestCase;
/** /**
* @covers SkillDisplay\Typo3Extension\Backend\Preview * @covers SkillDisplay\Typo3Extension\Backend\Preview
*/ */
class PreviewTest extends TestCase class PreviewTest extends TestCase
{ {
use ProphecyTrait;
/** /**
* @test * @test
*/ */

View file

@ -21,20 +21,17 @@ namespace SkillDisplay\Typo3Extension\Tests\Unit\Frontend\DataProcessing;
* 02110-1301, USA. * 02110-1301, USA.
*/ */
use PHPUnit\Framework\TestCase;
use Prophecy\PhpUnit\ProphecyTrait;
use SkillDisplay\PHPToolKit\Api\SkillSet; use SkillDisplay\PHPToolKit\Api\SkillSet;
use SkillDisplay\PHPToolKit\Entity\SkillSet as SkillSetEntity; use SkillDisplay\PHPToolKit\Entity\SkillSet as SkillSetEntity;
use SkillDisplay\Typo3Extension\Frontend\DataProcessing\SkillSets; use SkillDisplay\Typo3Extension\Frontend\DataProcessing\SkillSets;
use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer; use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
use TYPO3\TestingFramework\Core\Unit\UnitTestCase as TestCase;
/** /**
* @covers SkillDisplay\Typo3Extension\Frontend\DataProcessing\SkillSets * @covers SkillDisplay\Typo3Extension\Frontend\DataProcessing\SkillSets
*/ */
class SkillSetsTest extends TestCase class SkillSetsTest extends TestCase
{ {
use ProphecyTrait;
/** /**
* @test * @test
*/ */

View file

@ -21,20 +21,17 @@ namespace SkillDisplay\Typo3Extension\Tests\Unit\Frontend\DataProcessing;
* 02110-1301, USA. * 02110-1301, USA.
*/ */
use PHPUnit\Framework\TestCase;
use Prophecy\PhpUnit\ProphecyTrait;
use SkillDisplay\PHPToolKit\Api\Skill; use SkillDisplay\PHPToolKit\Api\Skill;
use SkillDisplay\PHPToolKit\Entity\Skill as SkillEntity; use SkillDisplay\PHPToolKit\Entity\Skill as SkillEntity;
use SkillDisplay\Typo3Extension\Frontend\DataProcessing\Skills; use SkillDisplay\Typo3Extension\Frontend\DataProcessing\Skills;
use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer; use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
use TYPO3\TestingFramework\Core\Unit\UnitTestCase as TestCase;
/** /**
* @covers SkillDisplay\Typo3Extension\Frontend\DataProcessing\Skills * @covers SkillDisplay\Typo3Extension\Frontend\DataProcessing\Skills
*/ */
class SkillsTest extends TestCase class SkillsTest extends TestCase
{ {
use ProphecyTrait;
/** /**
* @test * @test
*/ */

View file

@ -21,20 +21,17 @@ namespace SkillDisplay\Typo3Extension\Tests\Unit;
* 02110-1301, USA. * 02110-1301, USA.
*/ */
use PHPUnit\Framework\TestCase;
use Prophecy\PhpUnit\ProphecyTrait;
use SkillDisplay\PHPToolKit\Configuration\Settings; use SkillDisplay\PHPToolKit\Configuration\Settings;
use SkillDisplay\Typo3Extension\SettingsFactory; use SkillDisplay\Typo3Extension\SettingsFactory;
use TYPO3\CMS\Core\Http\ServerRequest; use TYPO3\CMS\Core\Http\ServerRequest;
use TYPO3\CMS\Core\Site\Entity\Site; use TYPO3\CMS\Core\Site\Entity\Site;
use TYPO3\TestingFramework\Core\Unit\UnitTestCase as TestCase;
/** /**
* @covers SkillDisplay\Typo3Extension\SettingsFactory * @covers SkillDisplay\Typo3Extension\SettingsFactory
*/ */
class SettingsFactoryTest extends TestCase class SettingsFactoryTest extends TestCase
{ {
use ProphecyTrait;
/** /**
* @test * @test
*/ */

View file

@ -21,12 +21,11 @@ namespace SkillDisplay\Typo3Extension\Tests\Unit\ViewHelpers\Verification;
* 02110-1301, USA. * 02110-1301, USA.
*/ */
use Prophecy\PhpUnit\ProphecyTrait;
use SkillDisplay\PHPToolKit\Verification\Link; use SkillDisplay\PHPToolKit\Verification\Link;
use SkillDisplay\Typo3Extension\ViewHelpers\Verification\ButtonViewHelper; use SkillDisplay\Typo3Extension\ViewHelpers\Verification\ButtonViewHelper;
use PHPUnit\Framework\TestCase;
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface; use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\TestingFramework\Core\Unit\UnitTestCase as TestCase;
/** /**
* @covers SkillDisplay\Typo3Extension\ViewHelpers\Verification\ButtonViewHelper * @covers SkillDisplay\Typo3Extension\ViewHelpers\Verification\ButtonViewHelper
@ -34,8 +33,6 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
*/ */
class ButtonViewHelperTest extends TestCase class ButtonViewHelperTest extends TestCase
{ {
use ProphecyTrait;
/** /**
* @test * @test
*/ */

View file

@ -21,12 +21,11 @@ namespace SkillDisplay\Typo3Extension\Tests\Unit\ViewHelpers\Verification;
* 02110-1301, USA. * 02110-1301, USA.
*/ */
use Prophecy\PhpUnit\ProphecyTrait;
use SkillDisplay\PHPToolKit\Verification\Link; use SkillDisplay\PHPToolKit\Verification\Link;
use SkillDisplay\Typo3Extension\ViewHelpers\Verification\UrlViewHelper; use SkillDisplay\Typo3Extension\ViewHelpers\Verification\UrlViewHelper;
use PHPUnit\Framework\TestCase;
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface; use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\TestingFramework\Core\Unit\UnitTestCase as TestCase;
/** /**
* @covers SkillDisplay\Typo3Extension\ViewHelpers\Verification\UrlViewHelper * @covers SkillDisplay\Typo3Extension\ViewHelpers\Verification\UrlViewHelper
@ -34,8 +33,6 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
*/ */
class UrlViewHelperTest extends TestCase class UrlViewHelperTest extends TestCase
{ {
use ProphecyTrait;
/** /**
* @test * @test
*/ */

View file

@ -44,7 +44,6 @@
"phpstan/phpstan": "^0.12.18", "phpstan/phpstan": "^0.12.18",
"phpstan/extension-installer": "^1.0", "phpstan/extension-installer": "^1.0",
"maglnet/composer-require-checker": "^2.1", "maglnet/composer-require-checker": "^2.1",
"phpspec/prophecy-phpunit": "^2.0.0",
"saschaegerer/phpstan-typo3": "^0.13.1", "saschaegerer/phpstan-typo3": "^0.13.1",
"sensiolabs/security-checker": "^6.0", "sensiolabs/security-checker": "^6.0",
"typo3/testing-framework": "^6.4", "typo3/testing-framework": "^6.4",