2017-02-14 1 views
0

Ich habe einige Tests in mehreren Dateien geschrieben: tests/ApiTest.php, tests/UtilsTest.php. Ich habe auch tests/bootstrap.php mit einigen umfasst und tests/phpunit.xmlWie laufen mehrere Testdateien in phpunit?

<phpunit 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.5/phpunit.xsd" 
    backupGlobals="false" 
    backupStaticAttributes="false" 
    bootstrap="bootstrap.php" 
    cacheTokens="false" 
    colors="true" 
    convertErrorsToExceptions="true" 
    convertNoticesToExceptions="true" 
    convertWarningsToExceptions="true" 
    forceCoversAnnotation="false" 
    mapTestClassNameToCoveredClassName="false" 
    processIsolation="false" 
    stopOnError="false" 
    stopOnFailure="false" 
    stopOnIncomplete="false" 
    stopOnSkipped="false" 
    stopOnRisky="false" 
    verbose="false"> 
</phpunit> 

Wenn ich tippe phpunit -c tests/phpunit.xml tests/ApiTest.php, alles funktioniert. Jetzt möchte ich Tests für alle Dateien im Testordner ausführen, die mit "Test.php" enden. Was soll ich tippen? Oder sollte ich eine Suite hinzufügen?

Wenn ich phpunit -c tests/phpunit.xml tests gebe, gibt es einen leeren Ausgang.

Antwort

0

Verstanden, der Name der Testklasse muss mit dem Dateinamen übereinstimmen, also muss in tests/ApiTest.phpclass ApiTest existieren.

Verwandte Themen