From 9781068ce19393a0f073a95fde45170c3e3a8df2 Mon Sep 17 00:00:00 2001 From: Jaapio Date: Mon, 20 Jul 2020 21:20:51 +0200 Subject: [PATCH] Move away from phropecy since it is not php8 ready --- tests/integration/DocblocksWithAnnotationsTest.php | 2 +- tests/unit/DocBlock/StandardTagFactoryTest.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/integration/DocblocksWithAnnotationsTest.php b/tests/integration/DocblocksWithAnnotationsTest.php index 3e9c4aa..67cead7 100644 --- a/tests/integration/DocblocksWithAnnotationsTest.php +++ b/tests/integration/DocblocksWithAnnotationsTest.php @@ -56,6 +56,6 @@ DOCCOMMENT; $factory = DocBlockFactory::createInstance(); $docblock = $factory->create($docComment); - $this->assertSame(0, printf('%i', $docblock->getTagsByName('my-tag'))); + $this->assertSame(0, (int) $docblock->getTagsByName('my-tag')[0]->render()); } } diff --git a/tests/unit/DocBlock/StandardTagFactoryTest.php b/tests/unit/DocBlock/StandardTagFactoryTest.php index 1154eb6..e22b21b 100644 --- a/tests/unit/DocBlock/StandardTagFactoryTest.php +++ b/tests/unit/DocBlock/StandardTagFactoryTest.php @@ -343,8 +343,8 @@ class StandardTagFactoryTest extends TestCase */ public function testValidFormattedTags(string $input, string $tagName, string $render) : void { - $fqsenResolver = $this->prophesize(FqsenResolver::class); - $tagFactory = new StandardTagFactory($fqsenResolver->reveal()); + $fqsenResolver = m::mock(FqsenResolver::class); + $tagFactory = new StandardTagFactory($fqsenResolver); $tagFactory->registerTagHandler('tag', Generic::class); $tag = $tagFactory->create($input); @@ -410,8 +410,8 @@ class StandardTagFactoryTest extends TestCase public function testInValidFormattedTags(string $input) : void { $this->expectException(InvalidArgumentException::class); - $fqsenResolver = $this->prophesize(FqsenResolver::class); - $tagFactory = new StandardTagFactory($fqsenResolver->reveal()); + $fqsenResolver = m::mock(FqsenResolver::class); + $tagFactory = new StandardTagFactory($fqsenResolver); $tagFactory->registerTagHandler('tag', Generic::class); $tagFactory->create($input); }