From 4362e7803de7b398e86c3ef1dfcc6748c02ab7bd Mon Sep 17 00:00:00 2001 From: Shish Date: Sun, 19 Jan 2025 22:13:10 +0000 Subject: [PATCH] fix unit tests I'm not sure how this passed in the first place, it seems to have been out of sync since it was first merged o_O --- generator/tests/MethodTest.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/generator/tests/MethodTest.php b/generator/tests/MethodTest.php index e0d20e4b..b02681c6 100644 --- a/generator/tests/MethodTest.php +++ b/generator/tests/MethodTest.php @@ -67,7 +67,7 @@ public function testGetTypeHintFromResource(): void $this->assertEquals('', $params[0]->getSignatureType()); $this->assertEquals('int', $params[1]->getDocBlockType()); $this->assertEquals('int', $params[1]->getSignatureType()); - + $docPage = new DocPage(__DIR__ . '/../doc/doc-en/en/reference/hash/functions/hash-update.xml'); $xmlObject = $docPage->getMethodSynopsis(); $method = new Method($xmlObject[0], $docPage->loadAndResolveFile(), $docPage->getModule(), new PhpStanFunctionMapReader(), Method::FALSY_TYPE); @@ -75,7 +75,7 @@ public function testGetTypeHintFromResource(): void $this->assertEquals('\HashContext', $params[0]->getDocBlockType()); $this->assertEquals('\HashContext', $params[0]->getSignatureType()); } - + public function testImapOpen5Parameter(): void { $docPage = new DocPage(__DIR__ . '/../doc/doc-en/en/reference/imap/functions/imap-open.xml'); @@ -83,7 +83,7 @@ public function testImapOpen5Parameter(): void $method = new Method($xmlObject[0], $docPage->loadAndResolveFile(), $docPage->getModule(), new PhpStanFunctionMapReader(), Method::FALSY_TYPE); $params = $method->getParams(); $this->assertEquals('array', $params[5]->getDocBlockType()); - $this->assertEquals('array', $params[5]->getSignatureType()); + $this->assertEquals('array', $params[5]->getSignatureType()); } public function testGetInitializer(): void @@ -96,7 +96,7 @@ public function testGetInitializer(): void $this->assertEquals('', $params[0]->getDefaultValue()); $this->assertEquals('false', $params[1]->getDefaultValue()); } - + public function testGetReturnDocBlock(): void { $docPage = new DocPage(__DIR__ . '/../doc/doc-en/en/reference/array/functions/array-replace.xml'); @@ -122,6 +122,6 @@ public function testOpensslCipherKeyLengthUnionTypeReturnDocBlocks(): void $docPage = new DocPage(__DIR__ . '/../doc/doc-en/en/reference/openssl/functions/openssl-cipher-key-length.xml'); $xmlObject = $docPage->getMethodSynopsis(); $method = new Method($xmlObject[0], $docPage->loadAndResolveFile(), $docPage->getModule(), new PhpStanFunctionMapReader(), Method::FALSY_TYPE); - $this->assertEquals("@return int Returns the cipher length on success, or false on failure.\n", $method->getReturnDocBlock()); + $this->assertEquals("@return int Returns the cipher length on success.\n", $method->getReturnDocBlock()); } }