generated from rich-id/bundle-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Matthias Devlamynck
committed
Feb 26, 2024
1 parent
67fb062
commit 5b7f98a
Showing
12 changed files
with
565 additions
and
1,257 deletions.
There are no files selected for viewing
5 changes: 1 addition & 4 deletions
5
TestConfiguration/Annotation/TestConfig.php → TestConfiguration/Attribute/TestConfig.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,13 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace RichCongress\TestFramework\TestConfiguration\Annotation; | ||
namespace RichCongress\TestFramework\TestConfiguration\Attribute; | ||
|
||
/** | ||
* Class TestConfig | ||
* | ||
* @package RichCongress\TestFramework\TestConfiguration | ||
* @author Nicolas Guilloux <[email protected]> | ||
* @copyright 2014 - 2020 RichCongress (https://www.richcongress.com) | ||
* | ||
* @Annotation | ||
* @Target({"CLASS", "METHOD"}) | ||
*/ | ||
#[\Attribute(\Attribute::IS_REPEATABLE | \Attribute::TARGET_CLASS | \Attribute::TARGET_METHOD)] | ||
class TestConfig | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,20 +3,19 @@ | |
namespace RichCongress\TestFramework\Tests\Resources; | ||
|
||
use PHPUnit\Framework\TestCase; | ||
use RichCongress\TestFramework\TestConfiguration\Annotation\TestConfig; | ||
use RichCongress\TestFramework\TestConfiguration\Attribute\TestConfig; | ||
|
||
/** | ||
* Class DummyTestCaseWithTestConfig | ||
* | ||
* @package RichCongress\TestFramework\Tests\Resources | ||
* @author Nicolas Guilloux <[email protected]> | ||
* @copyright 2014 - 2020 RichCongress (https://www.richcongress.com) | ||
* | ||
* @TestConfig({ | ||
* "test_case_configuration": "this is a test", | ||
* "test_case_configuration_2": 10 | ||
* }) | ||
*/ | ||
#[TestConfig([ | ||
'test_case_configuration' => 'this is a test', | ||
'test_case_configuration_2' => 10 | ||
])] | ||
abstract class DummyTestCaseWithTestConfig extends TestCase | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
namespace RichCongress\TestFramework\Tests\TestConfiguration; | ||
|
||
use RichCongress\TestFramework\TestConfiguration\Annotation\TestConfig; | ||
use RichCongress\TestFramework\TestConfiguration\Attribute\TestConfig; | ||
use RichCongress\TestFramework\TestConfiguration\TestConfigurationExtractor; | ||
use RichCongress\TestFramework\Tests\Resources\DummyTestCaseWithTestConfig; | ||
|
||
|
@@ -13,15 +13,13 @@ | |
* @author Nicolas Guilloux <[email protected]> | ||
* @copyright 2014 - 2020 RichCongress (https://www.richcongress.com) | ||
* | ||
* @covers \RichCongress\TestFramework\TestConfiguration\Annotation\TestConfig | ||
* @covers \RichCongress\TestFramework\TestConfiguration\Attribute\TestConfig | ||
* @covers \RichCongress\TestFramework\TestConfiguration\TestConfigurationExtractor | ||
* @TestConfig("test_class_configuration") | ||
*/ | ||
#[TestConfig('test_class_configuration')] | ||
final class WithClassConfigTest extends DummyTestCaseWithTestConfig | ||
{ | ||
/** | ||
* @TestConfig("test_method_configuration") | ||
*/ | ||
#[TestConfig('test_method_configuration')] | ||
public function testWithTestConfig(): void | ||
{ | ||
$testConfig = TestConfigurationExtractor::getRecursively(__CLASS__, __FUNCTION__); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
namespace RichCongress\TestFramework\Tests\TestConfiguration; | ||
|
||
use RichCongress\TestFramework\TestConfiguration\Annotation\TestConfig; | ||
use RichCongress\TestFramework\TestConfiguration\Attribute\TestConfig; | ||
use RichCongress\TestFramework\TestConfiguration\TestConfigurationExtractor; | ||
use RichCongress\TestFramework\Tests\Resources\DummyTestCaseWithTestConfig; | ||
|
||
|
@@ -13,14 +13,12 @@ | |
* @author Nicolas Guilloux <[email protected]> | ||
* @copyright 2014 - 2020 RichCongress (https://www.richcongress.com) | ||
* | ||
* @covers \RichCongress\TestFramework\TestConfiguration\Annotation\TestConfig | ||
* @covers \RichCongress\TestFramework\TestConfiguration\Attribute\TestConfig | ||
* @covers \RichCongress\TestFramework\TestConfiguration\TestConfigurationExtractor | ||
*/ | ||
final class WithTestCaseConfigTest extends DummyTestCaseWithTestConfig | ||
{ | ||
/** | ||
* @TestConfig("test_method_configuration") | ||
*/ | ||
#[TestConfig('test_method_configuration')] | ||
public function testWithTestConfig(): void | ||
{ | ||
$testConfig = TestConfigurationExtractor::getRecursively(__CLASS__, __FUNCTION__); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
namespace RichCongress\TestFramework\Tests\TestConfiguration; | ||
|
||
use PHPUnit\Framework\TestCase; | ||
use RichCongress\TestFramework\TestConfiguration\Annotation\TestConfig; | ||
use RichCongress\TestFramework\TestConfiguration\Attribute\TestConfig; | ||
use RichCongress\TestFramework\TestConfiguration\TestConfigurationExtractor; | ||
|
||
/** | ||
|
@@ -13,14 +13,12 @@ | |
* @author Nicolas Guilloux <[email protected]> | ||
* @copyright 2014 - 2020 RichCongress (https://www.richcongress.com) | ||
* | ||
* @covers \RichCongress\TestFramework\TestConfiguration\Annotation\TestConfig | ||
* @covers \RichCongress\TestFramework\TestConfiguration\Attribute\TestConfig | ||
* @covers \RichCongress\TestFramework\TestConfiguration\TestConfigurationExtractor | ||
*/ | ||
final class WithoutClassConfigTest extends TestCase | ||
{ | ||
/** | ||
* @TestConfig("test_method_configuration") | ||
*/ | ||
#[TestConfig('test_method_configuration')] | ||
public function testWithTestConfig(): void | ||
{ | ||
$testConfig = TestConfigurationExtractor::getRecursively(__CLASS__, __FUNCTION__); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.