Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TASK] Use Test attribute in functional test examples #4794

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@

namespace TYPO3\CMS\Styleguide\Tests\Functional\TcaDataGenerator;

use PHPUnit\Framework\Attributes\Test;
use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase;

/**
* Test case
*/
class GeneratorTest extends FunctionalTestCase
{
/**
Expand All @@ -16,10 +14,8 @@ class GeneratorTest extends FunctionalTestCase
'typo3conf/ext/styleguide',
];

/**
* @test
*/
public function generatorCreatesBasicRecord()
#[Test]
public function generatorCreatesBasicRecord(): void
{
//...
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace MyVendor\MyExtension\Tests\Functional;

use PHPUnit\Framework\Attributes\Test;
use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase;

class SomeTest extends FunctionalTestCase
Expand All @@ -12,9 +13,7 @@ class SomeTest extends FunctionalTestCase
'workspaces',
];

/**
* @test
*/
#[Test]
public function somethingWithWorkspaces(): void
{
//...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace MyVendor\MyExtension\Tests\Functional;

use PHPUnit\Framework\Attributes\Test;
use Symfony\Component\Mailer\Transport\NullTransport;
use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase;

Expand All @@ -15,9 +16,7 @@ class SomeTest extends FunctionalTestCase
],
];

/**
* @test
*/
#[Test]
public function something(): void
{
//...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace MyVendor\MyExtension\Tests\Functional;

use PHPUnit\Framework\Attributes\Test;
use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase;

class SomeTest extends FunctionalTestCase
Expand All @@ -13,9 +14,7 @@ class SomeTest extends FunctionalTestCase
'typo3conf/ext/base_extension',
];

/**
* @test
*/
#[Test]
public function somethingWithExtensions(): void
{
//...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace MyVendor\MyExtension\Tests\Functional;

use PHPUnit\Framework\Attributes\Test;
use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase;

class SomeTest extends FunctionalTestCase
Expand All @@ -12,9 +13,7 @@ class SomeTest extends FunctionalTestCase
'typo3/sysext/impexp/Tests/Functional/Fixtures/Folders/fileadmin/user_upload/typo3_image2.jpg' => 'fileadmin/user_upload/typo3_image2.jpg',
];

/**
* @test
*/
#[Test]
public function somethingWithFiles(): void
{
//...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@

namespace MyVendor\MyExtension\Tests\Functional;

use PHPUnit\Framework\Attributes\Test;
use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase;

class SomeTest extends FunctionalTestCase
{
/**
* @test
*/
#[Test]
public function somethingWithWorkspaces(): void
{
$this->setUpFrontendRootPage(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,19 @@

namespace MyVendor\MyExtension\Tests\Functional;

use PHPUnit\Framework\Attributes\Test;
use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase;

/**
* Test case
*/
class SomeTest extends FunctionalTestCase
{
public function testSomething()
#[Test]
public function importData(): void
{
// Load a xml file relative to test case file
// Load a CSV file relative to test case file
$this->importCSVDataSet(__DIR__ . '/../Fixtures/pages.csv');
// Load a xml file of some extension
// Load a CSV file of some extension
$this->importCSVDataSet('EXT:frontend/Tests/Functional/Fixtures/pages-title-tag.csv');
// Load a xml file provided by the typo3/testing-framework package
// Load a CSV file provided by the typo3/testing-framework package
$this->importCSVDataSet('PACKAGE:typo3/testing-framework/Resources/Core/Functional/Fixtures/pages.csv');
}
}
Loading