Skip to content

Commit

Permalink
Add regression test
Browse files Browse the repository at this point in the history
  • Loading branch information
herndlm authored and ondrejmirtes committed Feb 25, 2022
1 parent d1c78f6 commit 9d450a4
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ public function testExtension(): void
]);
}

public function testBug33(): void
{
$this->analyse([__DIR__ . '/data/bug-33.php'], []);
}

public function testBug68(): void
{
$this->analyse([__DIR__ . '/data/bug-68.php'], []);
Expand Down
17 changes: 17 additions & 0 deletions tests/Type/WebMozartAssert/data/bug-33.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

declare(strict_types=1);

namespace WebmozartAssertBug33;

use Webmozart\Assert\Assert;

class Bug33
{

public function foo(?string $bar)
{
Assert::nullOrStringNotEmpty($bar);
}

}

0 comments on commit 9d450a4

Please sign in to comment.