Skip to content

Commit

Permalink
repro in non-test
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek committed Jan 17, 2024
1 parent d3a27c1 commit 28fa304
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 10 deletions.
6 changes: 1 addition & 5 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,8 @@
</testsuites>
<source>
<include>
<directory>src</directory>
<directory>tests</directory>
<directory>src/Repro</directory>
</include>
<exclude>
<directory>src/Behat</directory>
</exclude>
</source>
<coverage>
<report>
Expand Down
21 changes: 21 additions & 0 deletions src/Repro/Repro.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

declare(strict_types=1);

namespace Atk4\Ui\Repro;

class Repro
{
public function repro(): void
{
if (\PHP_INT_SIZE === 4) {
self::foo();
}

self::foo();
}

public static function foo(): void
{
}
}
8 changes: 3 additions & 5 deletions tests/JsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,15 @@

namespace Atk4\Ui\Tests;

use Atk4\Ui\Repro\Repro;
use PHPUnit\Framework\TestCase;

class JsTest extends TestCase
{
public function testNumbers(): void
{
if (\PHP_INT_SIZE === 4) {
self::markTestIncomplete('Test is not supported on 32bit php');
}
Repro::repro();

$v = 'x';
self::assertSame('x', $v);
self::assertTrue(true);
}
}

0 comments on commit 28fa304

Please sign in to comment.