Add coverage information to tests, fix coverage of NodaValidationHelper
This commit is contained in:
parent
1a7dbcd6f6
commit
c9b0e7085f
|
@ -19,4 +19,9 @@
|
||||||
<directory>tests/</directory>
|
<directory>tests/</directory>
|
||||||
</testsuite>
|
</testsuite>
|
||||||
</testsuites>
|
</testsuites>
|
||||||
|
<coverage>
|
||||||
|
<include>
|
||||||
|
<directory suffix=".php">src</directory>
|
||||||
|
</include>
|
||||||
|
</coverage>
|
||||||
</phpunit>
|
</phpunit>
|
||||||
|
|
|
@ -9,6 +9,8 @@ use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This script contains tests for the actor name splitter.
|
* This script contains tests for the actor name splitter.
|
||||||
|
*
|
||||||
|
* @covers \NodaNameSplitter
|
||||||
*/
|
*/
|
||||||
final class NodaNameSplitterTest extends TestCase {
|
final class NodaNameSplitterTest extends TestCase {
|
||||||
/**
|
/**
|
||||||
|
@ -17,6 +19,7 @@ final class NodaNameSplitterTest extends TestCase {
|
||||||
* @author Joshua Ramon Enslin <joshua@museum-digital.de>
|
* @author Joshua Ramon Enslin <joshua@museum-digital.de>
|
||||||
* @group ValidOutput
|
* @group ValidOutput
|
||||||
* @small
|
* @small
|
||||||
|
* @covers \NodaNameSplitter::givenNameFamilyNameFromString
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -9,6 +9,8 @@ use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This script contains tests for the automatic translation class for time names.
|
* This script contains tests for the automatic translation class for time names.
|
||||||
|
*
|
||||||
|
* @covers \NodaTimeAutotranslater
|
||||||
*/
|
*/
|
||||||
final class NodaTimeAutotranslaterTest extends TestCase {
|
final class NodaTimeAutotranslaterTest extends TestCase {
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -9,6 +9,8 @@ use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This script contains tests for the time name splitter.
|
* This script contains tests for the time name splitter.
|
||||||
|
*
|
||||||
|
* @covers \NodaTimeSplitter
|
||||||
*/
|
*/
|
||||||
final class NodaTimeSplitterTest extends TestCase {
|
final class NodaTimeSplitterTest extends TestCase {
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -9,6 +9,8 @@ use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This script contains tests for the uncertainty helper.
|
* This script contains tests for the uncertainty helper.
|
||||||
|
*
|
||||||
|
* @covers \NodaUncertaintyHelper
|
||||||
*/
|
*/
|
||||||
final class NodaUncertaintyHelperTest extends TestCase {
|
final class NodaUncertaintyHelperTest extends TestCase {
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -9,8 +9,24 @@ use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This script contains tests for the validation of single field contents.
|
* This script contains tests for the validation of single field contents.
|
||||||
|
*
|
||||||
|
* @covers \NodaValidationHelper
|
||||||
*/
|
*/
|
||||||
final class NodaValidationHelperTest extends TestCase {
|
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.
|
* Test successfully refusing too short actor descriptions.
|
||||||
*
|
*
|
||||||
|
|
|
@ -9,6 +9,8 @@ use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This script contains tests for the Wikidata fetcher.
|
* This script contains tests for the Wikidata fetcher.
|
||||||
|
*
|
||||||
|
* @covers \NodaWikidataFetcher
|
||||||
*/
|
*/
|
||||||
final class NodaWikidataFetcherTest extends TestCase {
|
final class NodaWikidataFetcherTest extends TestCase {
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue
Block a user