3

PHPUnit テストの PHPStorm でこの警告が表示されますが、それが何について話しているのかわかりませんか?

Namespace not bound

<phpunit colors="true" bootstrap="./tests/bootstrap.php">
    <testsuite name="IniParserTest">
        <directory>./tests/Test</directory>
    </testsuite>
</phpunit>
4

1 に答える 1

1

次のように、開始要素ノードで XML スキーマを指定する必要があります。

<phpunit colors="true" bootstrap="./tests/bootstrap.php" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/3.7/phpunit.xsd">
    <testsuite name="IniParserTest">
        <directory>./tests/Test</directory>
    </testsuite>
</phpunit>

の xmlns:xsi および xsi:noNamespaceSchemaLocation 属性に注意してください。

これで、XML が有効になり、エラーが発生しなくなります。

ソース: https://phpunit.de/manual/3.7/en/appendixes.configuration.html

于 2016-12-01T09:52:04.437 に答える