Skip to content

Commit ed676d0

Browse files
committed
Added test to prevent extra whitespaces
1 parent d399fcf commit ed676d0

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

tests/unit/CollectionResolverTest.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,25 @@ public function testResolvingArrayCollectionWithKeyAndWhitespace()
176176
$this->assertInstanceOf(Types\Compound::class, $valueType);
177177
}
178178

179+
/**
180+
* @covers ::__construct
181+
* @covers ::resolve
182+
*
183+
* @expectedException \InvalidArgumentException
184+
*
185+
* @uses \phpDocumentor\Reflection\Types\Context
186+
* @uses \phpDocumentor\Reflection\Types\Compound
187+
* @uses \phpDocumentor\Reflection\Types\Collection
188+
* @uses \phpDocumentor\Reflection\Types\String_
189+
*/
190+
public function testResolvingArrayCollectionWithKeyAndTooManyWhitespace()
191+
{
192+
$fixture = new TypeResolver();
193+
194+
/** @var Collection $resolvedType */
195+
$resolvedType = $fixture->resolve('array<string, object|array>', new Context(''));
196+
}
197+
179198
/**
180199
* @covers ::__construct
181200
* @covers ::resolve

0 commit comments

Comments
 (0)