Skip to content

Commit

Permalink
Add regression test
Browse files Browse the repository at this point in the history
  • Loading branch information
herndlm committed Feb 23, 2022
1 parent 0e496ac commit 03c9818
Show file tree
Hide file tree
Showing 2 changed files with 29 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 testBug68(): void
{
$this->analyse([__DIR__ . '/data/bug-68.php'], []);
}

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

declare(strict_types=1);

namespace PHPStan\Type\WebMozartAssert;

use Webmozart\Assert\Assert;

final class Bug68
{

public function foo(): void
{
$encryptedValue = "some value";
$valueParts = explode(':', $encryptedValue);

Assert::count(
$valueParts,
2,
'Encrypted secret parameter was expected to consist of 2 parts separated by a colon'
);
}

}

0 comments on commit 03c9818

Please sign in to comment.