Add coverage information to tests, fix coverage of NodaValidationHelper
This commit is contained in:
parent
1a7dbcd6f6
commit
c9b0e7085f
15
phpunit.xml
15
phpunit.xml
|
@ -14,9 +14,14 @@
|
|||
testdox="true"
|
||||
timeoutForSmallTests="1" timeoutForMediumTests="10" timeoutForLargeTests="60"
|
||||
verbose="true">
|
||||
<testsuites>
|
||||
<testsuite name="tests">
|
||||
<directory>tests/</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
<testsuites>
|
||||
<testsuite name="tests">
|
||||
<directory>tests/</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
<coverage>
|
||||
<include>
|
||||
<directory suffix=".php">src</directory>
|
||||
</include>
|
||||
</coverage>
|
||||
</phpunit>
|
||||
|
|
|
@ -9,6 +9,8 @@ use PHPUnit\Framework\TestCase;
|
|||
|
||||
/**
|
||||
* This script contains tests for the actor name splitter.
|
||||
*
|
||||
* @covers \NodaNameSplitter
|
||||
*/
|
||||
final class NodaNameSplitterTest extends TestCase {
|
||||
/**
|
||||
|
@ -17,6 +19,7 @@ final class NodaNameSplitterTest extends TestCase {
|
|||
* @author Joshua Ramon Enslin <joshua@museum-digital.de>
|
||||
* @group ValidOutput
|
||||
* @small
|
||||
* @covers \NodaNameSplitter::givenNameFamilyNameFromString
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
|
|
@ -9,6 +9,8 @@ use PHPUnit\Framework\TestCase;
|
|||
|
||||
/**
|
||||
* This script contains tests for the automatic translation class for time names.
|
||||
*
|
||||
* @covers \NodaTimeAutotranslater
|
||||
*/
|
||||
final class NodaTimeAutotranslaterTest extends TestCase {
|
||||
/**
|
||||
|
|
|
@ -9,6 +9,8 @@ use PHPUnit\Framework\TestCase;
|
|||
|
||||
/**
|
||||
* This script contains tests for the time name splitter.
|
||||
*
|
||||
* @covers \NodaTimeSplitter
|
||||
*/
|
||||
final class NodaTimeSplitterTest extends TestCase {
|
||||
/**
|
||||
|
|
|
@ -9,6 +9,8 @@ use PHPUnit\Framework\TestCase;
|
|||
|
||||
/**
|
||||
* This script contains tests for the uncertainty helper.
|
||||
*
|
||||
* @covers \NodaUncertaintyHelper
|
||||
*/
|
||||
final class NodaUncertaintyHelperTest extends TestCase {
|
||||
/**
|
||||
|
|
|
@ -9,8 +9,24 @@ use PHPUnit\Framework\TestCase;
|
|||
|
||||
/**
|
||||
* This script contains tests for the validation of single field contents.
|
||||
*
|
||||
* @covers \NodaValidationHelper
|
||||
*/
|
||||
final class NodaValidationHelperTest extends TestCase {
|
||||
/**
|
||||
* Test that a specific error is thrown if no description for actors is provided.
|
||||
*
|
||||
* @small
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testActorDescriptionValidationFailsOnEmptyInput():void {
|
||||
|
||||
$this->expectException(MDInvalidEmptyInputException::class);
|
||||
NodaValidationHelper::validateActorDescription("");
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Test successfully refusing too short actor descriptions.
|
||||
*
|
||||
|
|
|
@ -9,6 +9,8 @@ use PHPUnit\Framework\TestCase;
|
|||
|
||||
/**
|
||||
* This script contains tests for the Wikidata fetcher.
|
||||
*
|
||||
* @covers \NodaWikidataFetcher
|
||||
*/
|
||||
final class NodaWikidataFetcherTest extends TestCase {
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue
Block a user