diff --git a/.phpunit.cache/test-results b/.phpunit.cache/test-results new file mode 100644 index 0000000..6fa6e94 --- /dev/null +++ b/.phpunit.cache/test-results @@ -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}} \ No newline at end of file diff --git a/tests/Assert/AssertTest.php b/tests/Assert/AssertTest.php index 6b4d72d..1892fac 100644 --- a/tests/Assert/AssertTest.php +++ b/tests/Assert/AssertTest.php @@ -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; @@ -19,9 +20,7 @@ use function opendir; /** - * Class \SimpleSAML\Assert\Assert - * - * @package simplesamlphp/saml2 + * Class \SimpleSAML\Assert\AssertTest */ final class AssertTest extends TestCase { @@ -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(); diff --git a/tests/Assert/Base64Test.php b/tests/Assert/Base64Test.php index 173ed3a..5d20ed1 100644 --- a/tests/Assert/Base64Test.php +++ b/tests/Assert/Base64Test.php @@ -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 { diff --git a/tests/Assert/DateTimeTest.php b/tests/Assert/DateTimeTest.php index 902e78a..7a23c30 100644 --- a/tests/Assert/DateTimeTest.php +++ b/tests/Assert/DateTimeTest.php @@ -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\DateTimeTest * - * @package simplesamlphp/saml2 * @covers \SimpleSAML\Assert\Assert::__callStatic * @covers \SimpleSAML\Assert\Assert::validDateTime * @covers \SimpleSAML\Assert\Assert::validDateTimeZulu @@ -19,10 +19,10 @@ final class DateTimeTest extends TestCase { /** - * @dataProvider provideDateTime * @param boolean $shouldPass * @param string $timestamp */ + #[DataProvider('provideDateTime')] public function testValidDateTime(bool $shouldPass, string $timestamp): void { try { @@ -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 { diff --git a/tests/Assert/DurationTest.php b/tests/Assert/DurationTest.php index a739625..b4629d3 100644 --- a/tests/Assert/DurationTest.php +++ b/tests/Assert/DurationTest.php @@ -4,6 +4,7 @@ namespace SimpleSAML\Test\Assert; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use SimpleSAML\Assert\Assert; use SimpleSAML\Assert\AssertionFailedException; @@ -11,17 +12,16 @@ /** * 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 { diff --git a/tests/Assert/NCNameTest.php b/tests/Assert/NCNameTest.php index d9955ed..022b6d6 100644 --- a/tests/Assert/NCNameTest.php +++ b/tests/Assert/NCNameTest.php @@ -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 { diff --git a/tests/Assert/NotInArrayTest.php b/tests/Assert/NotInArrayTest.php index bb7c946..02e3609 100644 --- a/tests/Assert/NotInArrayTest.php +++ b/tests/Assert/NotInArrayTest.php @@ -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 { diff --git a/tests/Assert/QNameTest.php b/tests/Assert/QNameTest.php index 2eedee7..0d3f172 100644 --- a/tests/Assert/QNameTest.php +++ b/tests/Assert/QNameTest.php @@ -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 { diff --git a/tests/Assert/URITest.php b/tests/Assert/URITest.php index 0f74797..6913e6a 100644 --- a/tests/Assert/URITest.php +++ b/tests/Assert/URITest.php @@ -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 @@ -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 { @@ -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 { @@ -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 {