Skip to content

Commit

Permalink
test: ignore phpstan
Browse files Browse the repository at this point in the history
  • Loading branch information
zeriyoshi committed Nov 25, 2024
1 parent 6abecae commit 4ccfc51
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/Extension/PHP70Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public function testSRand(): void
{
\Colopl\ColoplBc\Php70\srand(1234);

/** @phpstan-ignore-next-line */
if (\PHP_ZTS === 0 || \PHP_ZTS === false) {
self::assertSame(\Colopl\ColoplBc\Php70\rand(), 479142414);
} else {
Expand All @@ -43,6 +44,7 @@ public function testSRandNull(): void
* @psalm-suppress PossiblyNullArgument
*/
\Colopl\ColoplBc\Php70\srand($seed);
/** @phpstan-ignore-next-line */
if (\PHP_ZTS === 0 || \PHP_ZTS === false) {
self::assertSame(\Colopl\ColoplBc\Php70\rand(), 1804289383);
} else {
Expand All @@ -53,6 +55,7 @@ public function testSRandNull(): void
public function testRand(): void
{
\Colopl\ColoplBc\Php70\srand(5678);
/** @phpstan-ignore-next-line */
if (\PHP_ZTS === 0 || \PHP_ZTS === false) {
self::assertSame(\Colopl\ColoplBc\Php70\rand(), 1860157456);
} else {
Expand All @@ -71,6 +74,7 @@ public function testShuffle(): void
\Colopl\ColoplBc\Php70\srand(1234);
\Colopl\ColoplBc\Php70\shuffle($arr);

/** @phpstan-ignore-next-line */
if (\PHP_ZTS === 0 || \PHP_ZTS === false) {
self::assertSame($arr, [2, 3, 4, 1]);
} else {
Expand All @@ -83,6 +87,7 @@ public function testStrShuffle(): void
$str = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.';
\Colopl\ColoplBc\Php70\srand(1234);

/** @phpstan-ignore-next-line */
if (\PHP_ZTS === 0 || \PHP_ZTS === false) {
self::assertSame(
\Colopl\ColoplBc\Php70\str_shuffle($str),
Expand All @@ -100,6 +105,7 @@ public function testArrayRand(): void
{
\Colopl\ColoplBc\Php70\srand(1234);

/** @phpstan-ignore-next-line */
if (\PHP_ZTS === 0 || \PHP_ZTS === false) {
self::assertSame(
\Colopl\ColoplBc\Php70\array_rand([1, 2, 3, 4, 5], 3),
Expand Down

0 comments on commit 4ccfc51

Please sign in to comment.