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 d9b6be3
Show file tree
Hide file tree
Showing 2 changed files with 21 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
16 changes: 16 additions & 0 deletions tests/Type/WebMozartAssert/data/bug-68.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

declare(strict_types=1);

namespace WebmozartAssertBug68;

use Webmozart\Assert\Assert;

$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 d9b6be3

Please sign in to comment.