Skip to content

Commit 586d049

Browse files
herndlmondrejmirtes
authored andcommitted
Add regression test
1 parent af6e2f5 commit 586d049

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

tests/Type/WebMozartAssert/ImpossibleCheckTypeMethodCallRuleTest.php

+5
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ public function testExtension(): void
4747
]);
4848
}
4949

50+
public function testBug68(): void
51+
{
52+
$this->analyse([__DIR__ . '/data/bug-68.php'], []);
53+
}
54+
5055
public function testBug85(): void
5156
{
5257
$this->analyse([__DIR__ . '/data/bug-85.php'], []);
+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace WebmozartAssertBug68;
6+
7+
use Webmozart\Assert\Assert;
8+
9+
$encryptedValue = "some value";
10+
$valueParts = explode(':', $encryptedValue);
11+
12+
Assert::count(
13+
$valueParts,
14+
2,
15+
'Encrypted secret parameter was expected to consist of 2 parts separated by a colon'
16+
);

0 commit comments

Comments
 (0)