Skip to content

Commit 9781068

Browse files
committed
Move away from phropecy since it is not php8 ready
1 parent eb3320e commit 9781068

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

tests/integration/DocblocksWithAnnotationsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,6 @@ public function testDocblockWithAnnotationHavingZeroValue(): void
5656
$factory = DocBlockFactory::createInstance();
5757
$docblock = $factory->create($docComment);
5858

59-
$this->assertSame(0, printf('%i', $docblock->getTagsByName('my-tag')));
59+
$this->assertSame(0, (int) $docblock->getTagsByName('my-tag')[0]->render());
6060
}
6161
}

tests/unit/DocBlock/StandardTagFactoryTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -343,8 +343,8 @@ public function testInvalidTagIsReturnedOnFailure() : void
343343
*/
344344
public function testValidFormattedTags(string $input, string $tagName, string $render) : void
345345
{
346-
$fqsenResolver = $this->prophesize(FqsenResolver::class);
347-
$tagFactory = new StandardTagFactory($fqsenResolver->reveal());
346+
$fqsenResolver = m::mock(FqsenResolver::class);
347+
$tagFactory = new StandardTagFactory($fqsenResolver);
348348
$tagFactory->registerTagHandler('tag', Generic::class);
349349
$tag = $tagFactory->create($input);
350350

@@ -410,8 +410,8 @@ public function validTagProvider() : array
410410
public function testInValidFormattedTags(string $input) : void
411411
{
412412
$this->expectException(InvalidArgumentException::class);
413-
$fqsenResolver = $this->prophesize(FqsenResolver::class);
414-
$tagFactory = new StandardTagFactory($fqsenResolver->reveal());
413+
$fqsenResolver = m::mock(FqsenResolver::class);
414+
$tagFactory = new StandardTagFactory($fqsenResolver);
415415
$tagFactory->registerTagHandler('tag', Generic::class);
416416
$tagFactory->create($input);
417417
}

0 commit comments

Comments
 (0)