-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
10 changed files
with
170 additions
and
31 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd" | ||
colors="true" | ||
displayDetailsOnIncompleteTests="true" | ||
displayDetailsOnSkippedTests="true" | ||
displayDetailsOnTestsThatTriggerDeprecations="true" | ||
displayDetailsOnTestsThatTriggerWarnings="true" | ||
displayDetailsOnTestsThatTriggerNotices="true" | ||
displayDetailsOnTestsThatTriggerErrors="true" | ||
defaultTestSuite="positive"> | ||
<testsuites> | ||
<testsuite name="positive"> | ||
<directory>test/report/Generate</directory> | ||
<exclude>test/report/Generate/NegativeTest.php</exclude> | ||
</testsuite> | ||
<testsuite name="negative"> | ||
<file>test/report/Generate/NegativeTest.php</file> | ||
</testsuite> | ||
</testsuites> | ||
<extensions> | ||
<bootstrap class="Qameta\Allure\PHPUnit\AllureExtension" /> | ||
</extensions> | ||
</phpunit> |
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd" | ||
colors="true" | ||
displayDetailsOnIncompleteTests="true" | ||
displayDetailsOnSkippedTests="true" | ||
displayDetailsOnTestsThatTriggerDeprecations="true" | ||
displayDetailsOnTestsThatTriggerWarnings="true" | ||
displayDetailsOnTestsThatTriggerNotices="true" | ||
displayDetailsOnTestsThatTriggerErrors="true" | ||
defaultTestSuite="unit"> | ||
<testsuites> | ||
<testsuite name="unit"> | ||
<directory>test/unit/</directory> | ||
</testsuite> | ||
</testsuites> | ||
<coverage> | ||
<include> | ||
<directory suffix=".php">src/</directory> | ||
</include> | ||
</coverage> | ||
</phpunit> |
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 |
---|---|---|
@@ -1,17 +1,26 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd" | ||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.1/phpunit.xsd" | ||
colors="true" | ||
displayDetailsOnIncompleteTests="true" | ||
displayDetailsOnSkippedTests="true" | ||
displayDetailsOnTestsThatTriggerDeprecations="true" | ||
displayDetailsOnTestsThatTriggerWarnings="true" | ||
displayDetailsOnTestsThatTriggerNotices="true" | ||
displayDetailsOnTestsThatTriggerErrors="true" | ||
defaultTestSuite="unit"> | ||
<testsuites> | ||
<testsuite name="unit"> | ||
<directory>test/unit/</directory> | ||
</testsuite> | ||
</testsuites> | ||
<coverage> | ||
<source> | ||
<include> | ||
<directory suffix=".php">src/</directory> | ||
<directory>src/</directory> | ||
</include> | ||
</coverage> | ||
<exclude> | ||
<directory>vendor/</directory> | ||
</exclude> | ||
</source> | ||
</phpunit> |
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Qameta\Allure\PHPUnit\Test\Report\Generate; | ||
|
||
use PHPUnit\Framework\Attributes\DataProvider; | ||
use PHPUnit\Framework\TestCase; | ||
use Qameta\Allure\Allure; | ||
use Qameta\Allure\Attribute\DisplayName; | ||
|
||
class DataProviderTest extends TestCase | ||
{ | ||
#[DataProvider('providerNamed'), DisplayName('Test with named data set')] | ||
public function testNamedDataSet(int $x, int $y): void | ||
{ | ||
Allure::runStep(fn () => self::assertSame($x, $y)); | ||
} | ||
|
||
public static function providerNamed(): iterable | ||
{ | ||
return [ | ||
'Simple name' => [1, 1], | ||
'' => [2, 2], | ||
'"Double-quoted" name' => [3, 3], | ||
"'Single-quoted' name" => [4, 4], | ||
' ' => [5, 5], | ||
]; | ||
} | ||
|
||
#[DataProvider('providerListed')] | ||
public function testListedDataSet(int $x, int $y): void | ||
{ | ||
Allure::runStep(fn () => self::assertSame($x, $y)); | ||
} | ||
|
||
public static function providerListed(): iterable | ||
{ | ||
return [ | ||
[1, 1], | ||
[2, 2], | ||
]; | ||
} | ||
} |
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 |
---|---|---|
|
@@ -261,6 +261,7 @@ protected function createTestWarningTriggeredEvent( | |
'file', | ||
1, | ||
false, | ||
false, | ||
); | ||
} | ||
} |