Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php declare(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Ber..
Decoded Output download
<?php declare(strict_types=1);
/*
* This file is part of PHPUnit.
*
* (c) Sebastian Bergmann <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PHPUnit\TestFixture\TestDox;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\TestDox;
use PHPUnit\Framework\TestCase;
#[TestDox('Text from class-level TestDox metadata')]
final class DataProviderWithNumericDataSetNameAndMetadataWithPlaceholdersTest extends TestCase
{
public static function provider(): array
{
return [
0 => [
'string',
0,
0.0,
['key' => 'value'],
true,
Foo::BAR,
Bar::FOO,
],
];
}
#[DataProvider('provider')]
#[TestDox('Text from method-level TestDox metadata for successful test with placeholders ($a, $b, $c, $d, $e, $f, $g)')]
public function testSomethingThatWorks(string $a, int $b, float $c, array $d, bool $e, Foo $f, Bar $g): void
{
$this->assertTrue(true);
}
#[DataProvider('provider')]
#[TestDox('Text from method-level TestDox metadata for failing test with placeholders ($a, $b, $c, $d, $e, $f, $g)')]
public function testSomethingThatDoesNotWork(string $a, int $b, float $c, array $d, bool $e, Foo $f, Bar $g): void
{
/* @noinspection PhpUnitAssertTrueWithIncompatibleTypeArgumentInspection */
$this->assertTrue(false);
}
}
?>
Did this file decode correctly?
Original Code
<?php declare(strict_types=1);
/*
* This file is part of PHPUnit.
*
* (c) Sebastian Bergmann <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PHPUnit\TestFixture\TestDox;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\TestDox;
use PHPUnit\Framework\TestCase;
#[TestDox('Text from class-level TestDox metadata')]
final class DataProviderWithNumericDataSetNameAndMetadataWithPlaceholdersTest extends TestCase
{
public static function provider(): array
{
return [
0 => [
'string',
0,
0.0,
['key' => 'value'],
true,
Foo::BAR,
Bar::FOO,
],
];
}
#[DataProvider('provider')]
#[TestDox('Text from method-level TestDox metadata for successful test with placeholders ($a, $b, $c, $d, $e, $f, $g)')]
public function testSomethingThatWorks(string $a, int $b, float $c, array $d, bool $e, Foo $f, Bar $g): void
{
$this->assertTrue(true);
}
#[DataProvider('provider')]
#[TestDox('Text from method-level TestDox metadata for failing test with placeholders ($a, $b, $c, $d, $e, $f, $g)')]
public function testSomethingThatDoesNotWork(string $a, int $b, float $c, array $d, bool $e, Foo $f, Bar $g): void
{
/* @noinspection PhpUnitAssertTrueWithIncompatibleTypeArgumentInspection */
$this->assertTrue(false);
}
}
Function Calls
None |
Stats
MD5 | f3bb5f34fc4fbd9e45c98855eedb0468 |
Eval Count | 0 |
Decode Time | 72 ms |