Skip to content

Commit d72977b

Browse files
committed
more testing
1 parent 7b61043 commit d72977b

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

generator/src/Generator/ComposerJsonEditor.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ public static function editComposerFileForGeneration(array $modules): void
2727
\file_put_contents(FileCreator::getSafeRootDir() . '/composer.json', $newContent);
2828
}
2929

30-
31-
32-
3330
/**
3431
* @param string[] $oldFiles
3532
* @param string[] $modules A list of modules

generator/tests/XmlDocParser/MethodTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@
99

1010
class MethodTest extends TestCase
1111
{
12+
public function testToString(): void
13+
{
14+
$docPage = new DocPage(DocPage::findReferenceDir() . '/pcre/functions/preg-match.xml');
15+
$xmlObject = $docPage->getMethodSynopsis();
16+
$method = new Method($xmlObject[0], $docPage->loadAndResolveFile(), $docPage->getModule(), new PhpStanFunctionMapReader(), ErrorType::FALSY);
17+
$this->assertStringContainsString('Error type: FALSY', (string)$method);
18+
}
19+
1220
public function testGetFunctionName(): void
1321
{
1422
$docPage = new DocPage(DocPage::findReferenceDir() . '/pcre/functions/preg-match.xml');

generator/tests/XmlDocParser/TypeTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@ public function testIsClass(): void
1414
$this->assertSame('\\SimpleXMLElement', Type::toRootNamespace('SimpleXMLElement'));
1515
$this->assertSame('bool', Type::toRootNamespace('bool'));
1616
$this->assertSame('int', Type::toRootNamespace('int'));
17+
$this->assertSame('', Type::toRootNamespace(''));
1718
}
1819
}

0 commit comments

Comments
 (0)