Skip to content

Commit

Permalink
Migrate phpunit metadata to attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
tvdijen committed Mar 19, 2024
1 parent 747fbb1 commit 4f44981
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 27 deletions.
1 change: 1 addition & 0 deletions .phpunit.cache/test-results
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"version":1,"defects":[],"times":{"SimpleSAML\\Test\\Assert\\AssertTest::testAssertionPassing":0.012,"SimpleSAML\\Test\\Assert\\AssertTest::testAssertionFailingThrowsException":0.001,"SimpleSAML\\Test\\Assert\\AssertTest::testAssertionFailingWithCustomExceptionThrowsCustomException":0,"SimpleSAML\\Test\\Assert\\AssertTest::testUnknownAssertionRaisesBadMethodCallException":0,"SimpleSAML\\Test\\Assert\\AssertTest::testUnknownNullOrAssertionRaisesBadMethodCallException":0,"SimpleSAML\\Test\\Assert\\AssertTest::testUnknownAllAssertionRaisesBadMethodCallException":0,"SimpleSAML\\Test\\Assert\\AssertTest::testNullOrCustomAssertionWorks":0,"SimpleSAML\\Test\\Assert\\AssertTest::testAllCustomAssertionWorks":0,"SimpleSAML\\Test\\Assert\\AssertTest::testValueToString#null":0.001,"SimpleSAML\\Test\\Assert\\AssertTest::testValueToString#true":0,"SimpleSAML\\Test\\Assert\\AssertTest::testValueToString#false":0,"SimpleSAML\\Test\\Assert\\AssertTest::testValueToString#array":0,"SimpleSAML\\Test\\Assert\\AssertTest::testValueToString#Stringable":0,"SimpleSAML\\Test\\Assert\\AssertTest::testValueToString#DateTime":0,"SimpleSAML\\Test\\Assert\\AssertTest::testValueToString#object":0,"SimpleSAML\\Test\\Assert\\AssertTest::testValueToString#resource":0,"SimpleSAML\\Test\\Assert\\AssertTest::testValueToString#string":0,"SimpleSAML\\Test\\Assert\\AssertTest::testValueToString#other":0,"SimpleSAML\\Test\\Assert\\Base64Test::testStringPlausibleBase64#valid":0,"SimpleSAML\\Test\\Assert\\Base64Test::testStringPlausibleBase64#bogus":0,"SimpleSAML\\Test\\Assert\\Base64Test::testStringPlausibleBase64#length not dividable by 4":0,"SimpleSAML\\Test\\Assert\\DateTimeTest::testValidDateTime#sub-second offset":0,"SimpleSAML\\Test\\Assert\\DateTimeTest::testValidDateTime#sub-second zulu":0,"SimpleSAML\\Test\\Assert\\DateTimeTest::testValidDateTime#offset":0,"SimpleSAML\\Test\\Assert\\DateTimeTest::testValidDateTime#zulu":0,"SimpleSAML\\Test\\Assert\\DateTimeTest::testValidDateTime#bogus":0,"SimpleSAML\\Test\\Assert\\DateTimeTest::testValidDateTime#whitespace":0,"SimpleSAML\\Test\\Assert\\DateTimeTest::testValidDateTimeZulu#sub-second zulu":0,"SimpleSAML\\Test\\Assert\\DateTimeTest::testValidDateTimeZulu#zulu":0,"SimpleSAML\\Test\\Assert\\DateTimeTest::testValidDateTimeZulu#sub-second offset":0,"SimpleSAML\\Test\\Assert\\DateTimeTest::testValidDateTimeZulu#offset":0,"SimpleSAML\\Test\\Assert\\DateTimeTest::testValidDateTimeZulu#bogus":0,"SimpleSAML\\Test\\Assert\\DateTimeTest::testValidDateTimeZulu#whitespace":0,"SimpleSAML\\Test\\Assert\\DurationTest::testValidDuration#0":0,"SimpleSAML\\Test\\Assert\\DurationTest::testValidDuration#1":0,"SimpleSAML\\Test\\Assert\\DurationTest::testValidDuration#2":0,"SimpleSAML\\Test\\Assert\\DurationTest::testValidDuration#3":0,"SimpleSAML\\Test\\Assert\\DurationTest::testValidDuration#4":0,"SimpleSAML\\Test\\Assert\\DurationTest::testValidDuration#5":0,"SimpleSAML\\Test\\Assert\\DurationTest::testValidDuration#6":0,"SimpleSAML\\Test\\Assert\\DurationTest::testValidDuration#7":0,"SimpleSAML\\Test\\Assert\\DurationTest::testValidDuration#8":0,"SimpleSAML\\Test\\Assert\\DurationTest::testValidDuration#9":0,"SimpleSAML\\Test\\Assert\\DurationTest::testValidDuration#10":0,"SimpleSAML\\Test\\Assert\\DurationTest::testValidDuration#11":0,"SimpleSAML\\Test\\Assert\\DurationTest::testValidDuration#12":0,"SimpleSAML\\Test\\Assert\\DurationTest::testValidDuration#13":0,"SimpleSAML\\Test\\Assert\\DurationTest::testValidDuration#14":0,"SimpleSAML\\Test\\Assert\\DurationTest::testValidDuration#15":0,"SimpleSAML\\Test\\Assert\\DurationTest::testValidDuration#16":0,"SimpleSAML\\Test\\Assert\\NCNameTest::testValidNCName#0":0,"SimpleSAML\\Test\\Assert\\NCNameTest::testValidNCName#1":0,"SimpleSAML\\Test\\Assert\\NCNameTest::testValidNCName#2":0,"SimpleSAML\\Test\\Assert\\NCNameTest::testValidNCName#3":0,"SimpleSAML\\Test\\Assert\\NCNameTest::testValidNCName#4":0,"SimpleSAML\\Test\\Assert\\NCNameTest::testValidNCName#5":0,"SimpleSAML\\Test\\Assert\\NotInArrayTest::testnotInArray#0":0,"SimpleSAML\\Test\\Assert\\NotInArrayTest::testnotInArray#1":0,"SimpleSAML\\Test\\Assert\\QNameTest::testValidQName#0":0,"SimpleSAML\\Test\\Assert\\QNameTest::testValidQName#1":0,"SimpleSAML\\Test\\Assert\\QNameTest::testValidQName#2":0,"SimpleSAML\\Test\\Assert\\QNameTest::testValidQName#3":0,"SimpleSAML\\Test\\Assert\\QNameTest::testValidQName#4":0,"SimpleSAML\\Test\\Assert\\QNameTest::testValidQName#5":0,"SimpleSAML\\Test\\Assert\\URITest::testValidURI#urn":0,"SimpleSAML\\Test\\Assert\\URITest::testValidURI#same-doc":0,"SimpleSAML\\Test\\Assert\\URITest::testValidURI#url":0,"SimpleSAML\\Test\\Assert\\URITest::testValidURI#bogus":0,"SimpleSAML\\Test\\Assert\\URITest::testValidURI#spn":0,"SimpleSAML\\Test\\Assert\\URITest::testValidURL#url":0,"SimpleSAML\\Test\\Assert\\URITest::testValidURL#same-doc":0,"SimpleSAML\\Test\\Assert\\URITest::testValidURL#urn":0,"SimpleSAML\\Test\\Assert\\URITest::testValidURL#bogus":0,"SimpleSAML\\Test\\Assert\\URITest::testValidURL#spn":0,"SimpleSAML\\Test\\Assert\\URITest::testValidURN#urn":0,"SimpleSAML\\Test\\Assert\\URITest::testValidURN#url":0,"SimpleSAML\\Test\\Assert\\URITest::testValidURN#same-doc":0,"SimpleSAML\\Test\\Assert\\URITest::testValidURN#bogus":0,"SimpleSAML\\Test\\Assert\\URITest::testValidURN#spn":0}}
7 changes: 3 additions & 4 deletions tests/Assert/AssertTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use DateTimeImmutable;
use ArrayIterator;
use LogicException;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use ReflectionMethod;
use SimpleSAML\Assert\Assert;
Expand All @@ -19,9 +20,7 @@
use function opendir;

/**
* Class \SimpleSAML\Assert\Assert
*
* @package simplesamlphp/saml2
* Class \SimpleSAML\Assert\AssertTest
*/
final class AssertTest extends TestCase
{
Expand Down Expand Up @@ -113,10 +112,10 @@ public function testAllCustomAssertionWorks(): void


/**
* @dataProvider provideValue
* @param mixed $value
* @param string $expected
*/
#[DataProvider('provideVValue')]
public function testValueToString($value, string $expected): void
{
$assert = new Assert();
Expand Down
6 changes: 3 additions & 3 deletions tests/Assert/Base64Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,24 @@

namespace SimpleSAML\Test\Assert;

use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use SimpleSAML\Assert\Assert;
use SimpleSAML\Assert\AssertionFailedException;

/**
* Class \SimpleSAML\Assert\Assert
* Class \SimpleSAML\Assert\Base64Test
*
* @package simplesamlphp/saml2
* @covers \SimpleSAML\Assert\Assert::__callStatic
* @covers \SimpleSAML\Assert\Assert::stringPlausibleBase64
*/
final class Base64Test extends TestCase
{
/**
* @dataProvider provideBase64
* @param boolean $shouldPass
* @param string $name
*/
#[DataProvider('provideBase64')]
public function testStringPlausibleBase64(bool $shouldPass, string $name): void
{
try {
Expand Down
8 changes: 4 additions & 4 deletions tests/Assert/DateTimeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,25 @@

namespace SimpleSAML\Test\Assert;

use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use SimpleSAML\Assert\Assert;
use SimpleSAML\Assert\AssertionFailedException;

/**
* Class \SimpleSAML\Assert\Assert
* Class \SimpleSAML\Assert\DateTimeTest
*
* @package simplesamlphp/saml2
* @covers \SimpleSAML\Assert\Assert::__callStatic
* @covers \SimpleSAML\Assert\Assert::validDateTime
* @covers \SimpleSAML\Assert\Assert::validDateTimeZulu
*/
final class DateTimeTest extends TestCase
{
/**
* @dataProvider provideDateTime
* @param boolean $shouldPass
* @param string $timestamp
*/
#[DataProvider('provideDateTime')]
public function testValidDateTime(bool $shouldPass, string $timestamp): void
{
try {
Expand All @@ -35,10 +35,10 @@ public function testValidDateTime(bool $shouldPass, string $timestamp): void


/**
* @dataProvider provideDateTimeZulu
* @param boolean $shouldPass
* @param string $timestamp
*/
#[DataProvider('provideDateTime')]
public function testValidDateTimeZulu(bool $shouldPass, string $timestamp): void
{
try {
Expand Down
4 changes: 2 additions & 2 deletions tests/Assert/DurationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,24 @@

namespace SimpleSAML\Test\Assert;

use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use SimpleSAML\Assert\Assert;
use SimpleSAML\Assert\AssertionFailedException;

/**
* Class \SimpleSAML\Assert\Assert
*
* @package simplesamlphp/saml2
* @covers \SimpleSAML\Assert\Assert::__callStatic
* @covers \SimpleSAML\Assert\Assert::validDuration
*/
final class DurationTest extends TestCase
{
/**
* @dataProvider provideDuration
* @param boolean $shouldPass
* @param string $duration
*/
#[DataProvider('provideDuration')]
public function testValidDuration(bool $shouldPass, string $duration): void
{
try {
Expand Down
6 changes: 3 additions & 3 deletions tests/Assert/NCNameTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,24 @@

namespace SimpleSAML\Test\Assert;

use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use SimpleSAML\Assert\Assert;
use SimpleSAML\Assert\AssertionFailedException;

/**
* Class \SimpleSAML\Assert\Assert
* Class \SimpleSAML\Assert\NCNameTest
*
* @package simplesamlphp/saml2
* @covers \SimpleSAML\Assert\Assert::__callStatic
* @covers \SimpleSAML\Assert\Assert::validNCName
*/
final class NCNameTest extends TestCase
{
/**
* @dataProvider provideNCName
* @param boolean $shouldPass
* @param string $name
*/
#[DataProvider('provideNCName')]
public function testValidNCName(bool $shouldPass, string $name): void
{
try {
Expand Down
6 changes: 3 additions & 3 deletions tests/Assert/NotInArrayTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,25 @@

namespace SimpleSAML\Test\Assert;

use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use SimpleSAML\Assert\Assert;
use SimpleSAML\Assert\AssertionFailedException;

/**
* Class \SimpleSAML\Assert\Assert
* Class \SimpleSAML\Assert\NotInArrayTest
*
* @package simplesamlphp/saml2
* @covers \SimpleSAML\Assert\Assert::__callStatic
* @covers \SimpleSAML\Assert\Assert::notInArray
*/
final class NotInArrayTest extends TestCase
{
/**
* @dataProvider provideNotInArray
* @param boolean $shouldPass
* @param mixed $item
* @param array $arr
*/
#[DataProvider('provideNotInArray')]
public function testnotInArray(bool $shouldPass, $item, array $arr): void
{
try {
Expand Down
6 changes: 3 additions & 3 deletions tests/Assert/QNameTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,24 @@

namespace SimpleSAML\Test\Assert;

use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use SimpleSAML\Assert\Assert;
use SimpleSAML\Assert\AssertionFailedException;

/**
* Class \SimpleSAML\Assert\Assert
* Class \SimpleSAML\Assert\QNameTest
*
* @package simplesamlphp/saml2
* @covers \SimpleSAML\Assert\Assert::__callStatic
* @covers \SimpleSAML\Assert\Assert::validQName
*/
final class QNameTest extends TestCase
{
/**
* @dataProvider provideQName
* @param boolean $shouldPass
* @param string $name
*/
#[DataProvider('provideQName')]
public function testValidQName(bool $shouldPass, string $name): void
{
try {
Expand Down
10 changes: 5 additions & 5 deletions tests/Assert/URITest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

namespace SimpleSAML\Test\Assert;

use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use SimpleSAML\Assert\Assert;
use SimpleSAML\Assert\AssertionFailedException;

/**
* Class \SimpleSAML\Assert\Assert
* Class \SimpleSAML\Assert\URITest
*
* @package simplesamlphp/saml2
* @covers \SimpleSAML\Assert\Assert::__callStatic
* @covers \SimpleSAML\Assert\Assert::validURI
* @covers \SimpleSAML\Assert\Assert::validURL
Expand All @@ -20,10 +20,10 @@
final class URITest extends TestCase
{
/**
* @dataProvider provideURI
* @param boolean $shouldPass
* @param string $uri
*/
#[DataProvider('provideURI')]
public function testValidURI(bool $shouldPass, string $uri): void
{
try {
Expand All @@ -36,10 +36,10 @@ public function testValidURI(bool $shouldPass, string $uri): void


/**
* @dataProvider provideURL
* @param boolean $shouldPass
* @param string $url
*/
#[DataProvider('provideURL')]
public function testValidURL(bool $shouldPass, string $url): void
{
try {
Expand All @@ -52,10 +52,10 @@ public function testValidURL(bool $shouldPass, string $url): void


/**
* @dataProvider provideURN
* @param boolean $shouldPass
* @param string $urn
*/
#[DataProvider('provideURN')]
public function testValidURN(bool $shouldPass, string $urn): void
{
try {
Expand Down

0 comments on commit 4f44981

Please sign in to comment.