diff options
Diffstat (limited to 'tests')
183 files changed, 7442 insertions, 15 deletions
diff --git a/tests/app/Elements/AbstractElementTest.php b/tests/app/Elements/AbstractElementTest.php new file mode 100644 index 0000000000..092ec2f7ca --- /dev/null +++ b/tests/app/Elements/AbstractElementTest.php @@ -0,0 +1,94 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +use Fisharebest\Webtrees\Contracts\ElementInterface; +use Fisharebest\Webtrees\TestCase; +use Fisharebest\Webtrees\Tree; + +/** + * Common tests for ElementInterface + */ +abstract class AbstractElementTest extends TestCase +{ + /** @var ElementInterface */ + protected static $element; + + /** + * @return void + */ + public function testCanonical(): void + { + self::assertSame('Foo bAr baZ', self::$element->canonical("Foo bAr baZ")); + self::assertSame('Foo bAr baZ', self::$element->canonical("\t Foo\t bAr \tbaZ\t ")); + self::assertSame('Foo bAr baZ', self::$element->canonical("\nFoo \n\r bAr \r\n baZ\r")); + } + + /** + * @return void + */ + public function testEscapeAtSigns(): void + { + if (static::$element instanceof AbstractXrefElement) { + self::assertSame('@X123@', static::$element->escape('@X123@')); + } else { + self::assertSame('@@X123@@', static::$element->escape('@X123@')); + } + } + + /** + * @return void + */ + public function testXssInValue(): void + { + $tree = $this->createMock(Tree::class); + $evil = '<script>evil()</script>'; + $html = static::$element->value($evil, $tree); + $message = 'XSS vulnerability in value()'; + + self::assertStringNotContainsStringIgnoringCase($evil, $html, $message); + } + + /** + * @return void + */ + public function testXssInLabelValue(): void + { + $tree = $this->createMock(Tree::class); + $evil = '<script>evil()</script>'; + $html = static::$element->labelValue($evil, $tree); + $message = 'XSS vulnerability in lebelValue()'; + + self::assertStringNotContainsStringIgnoringCase($evil, $html, $message); + } + + /** + * @return void + */ + public function testXssInEdit(): void + { + $tree = $this->createMock(Tree::class); + $evil = '<script>evil()</script>'; + $html = static::$element->edit('id', 'name', $evil, $tree); + $message = 'XSS vulnerability in edit()'; + + self::assertStringNotContainsStringIgnoringCase($evil, $html, $message); + } +} diff --git a/tests/app/Elements/AbstractEventElementTest.php b/tests/app/Elements/AbstractEventElementTest.php new file mode 100644 index 0000000000..2322a408cb --- /dev/null +++ b/tests/app/Elements/AbstractEventElementTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class AbstractEventElement + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\AbstractEventElement + */ +class AbstractEventElementTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new AbstractEventElement('label'); + } +} diff --git a/tests/app/Elements/AbstractXrefElementTest.php b/tests/app/Elements/AbstractXrefElementTest.php new file mode 100644 index 0000000000..39f7a0a76f --- /dev/null +++ b/tests/app/Elements/AbstractXrefElementTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class AbstractXrefElement + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\AbstractXrefElement + */ +class AbstractXrefElementTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new AbstractXrefElement('label'); + } +} diff --git a/tests/app/Elements/AddressCityTest.php b/tests/app/Elements/AddressCityTest.php new file mode 100644 index 0000000000..a57d455b12 --- /dev/null +++ b/tests/app/Elements/AddressCityTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class AddressCity + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\AddressCity + */ +class AddressCityTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new AddressCity('label'); + } +} diff --git a/tests/app/Elements/AddressCountryTest.php b/tests/app/Elements/AddressCountryTest.php new file mode 100644 index 0000000000..a019c67ba8 --- /dev/null +++ b/tests/app/Elements/AddressCountryTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class AddressCountry + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\AddressCountry + */ +class AddressCountryTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new AddressCountry('label'); + } +} diff --git a/tests/app/Elements/AddressEmailTest.php b/tests/app/Elements/AddressEmailTest.php new file mode 100644 index 0000000000..c434b601a5 --- /dev/null +++ b/tests/app/Elements/AddressEmailTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class AddressEmail + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\AddressEmail + */ +class AddressEmailTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new AddressEmail('label'); + } +} diff --git a/tests/app/Elements/AddressFaxTest.php b/tests/app/Elements/AddressFaxTest.php new file mode 100644 index 0000000000..0f9a8f3e88 --- /dev/null +++ b/tests/app/Elements/AddressFaxTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class AddressFax + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\AddressFax + */ +class AddressFaxTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new AddressFax('label'); + } +} diff --git a/tests/app/Elements/AddressLine1Test.php b/tests/app/Elements/AddressLine1Test.php new file mode 100644 index 0000000000..a52c0a2c84 --- /dev/null +++ b/tests/app/Elements/AddressLine1Test.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class AddressLine1 + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\AddressLine1 + */ +class AddressLine1Test extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new AddressLine1('label'); + } +} diff --git a/tests/app/Elements/AddressLine2Test.php b/tests/app/Elements/AddressLine2Test.php new file mode 100644 index 0000000000..21a7e0d439 --- /dev/null +++ b/tests/app/Elements/AddressLine2Test.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class AddressLine2 + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\AddressLine2 + */ +class AddressLine2Test extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new AddressLine2('label'); + } +} diff --git a/tests/app/Elements/AddressLine3Test.php b/tests/app/Elements/AddressLine3Test.php new file mode 100644 index 0000000000..b860c20189 --- /dev/null +++ b/tests/app/Elements/AddressLine3Test.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class AddressLine3 + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\AddressLine3 + */ +class AddressLine3Test extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new AddressLine3('label'); + } +} diff --git a/tests/app/Elements/AddressLineTest.php b/tests/app/Elements/AddressLineTest.php new file mode 100644 index 0000000000..54f238d090 --- /dev/null +++ b/tests/app/Elements/AddressLineTest.php @@ -0,0 +1,49 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class AddressLine + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\AddressLine + */ +class AddressLineTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new AddressLine('label'); + } + + /** + * @return void + */ + public function testCanonical(): void + { + self::assertSame('Foo bAr baZ', self::$element->canonical("Foo bAr baZ")); + self::assertSame(' Foo bAr baZ ', self::$element->canonical("\t Foo\t bAr \tbaZ\t ")); + self::assertSame("\nFoo \n\n bAr \n baZ\n", self::$element->canonical("\nFoo \n\r bAr \r\n baZ\r")); + } +} diff --git a/tests/app/Elements/AddressPostalCodeTest.php b/tests/app/Elements/AddressPostalCodeTest.php new file mode 100644 index 0000000000..e0f1db54f6 --- /dev/null +++ b/tests/app/Elements/AddressPostalCodeTest.php @@ -0,0 +1,49 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class AddressPostalCode + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\AddressPostalCode + */ +class AddressPostalCodeTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new AddressPostalCode('label'); + } + + /** + * @return void + */ + public function testCanonical(): void + { + self::assertSame('FOO BAR BAZ', self::$element->canonical("Foo bAr baZ")); + self::assertSame('FOO BAR BAZ', self::$element->canonical("\t Foo\t bAr \tbaZ\t ")); + self::assertSame('FOO BAR BAZ', self::$element->canonical("\nFoo \n\r bAr \r\n baZ\r")); + } +} diff --git a/tests/app/Elements/AddressStateTest.php b/tests/app/Elements/AddressStateTest.php new file mode 100644 index 0000000000..1c41d2258f --- /dev/null +++ b/tests/app/Elements/AddressStateTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class AddressState + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\AddressState + */ +class AddressStateTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new AddressState('label'); + } +} diff --git a/tests/app/Elements/AddressWebPageTest.php b/tests/app/Elements/AddressWebPageTest.php new file mode 100644 index 0000000000..9a023bf29b --- /dev/null +++ b/tests/app/Elements/AddressWebPageTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class AddressWebPage + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\AddressWebPage + */ +class AddressWebPageTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new AddressWebPage('label'); + } +} diff --git a/tests/app/Elements/AdoptedByWhichParentTest.php b/tests/app/Elements/AdoptedByWhichParentTest.php new file mode 100644 index 0000000000..13230aae18 --- /dev/null +++ b/tests/app/Elements/AdoptedByWhichParentTest.php @@ -0,0 +1,49 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class AdoptedByWhichParent + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\AdoptedByWhichParent + */ +class AdoptedByWhichParentTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new AdoptedByWhichParent('label'); + } + + /** + * @return void + */ + public function testCanonical(): void + { + self::assertSame('FOO BAR BAZ', self::$element->canonical("Foo bAr baZ")); + self::assertSame('FOO BAR BAZ', self::$element->canonical("\t Foo\t bAr \tbaZ\t ")); + self::assertSame('FOO BAR BAZ', self::$element->canonical("\nFoo \n\r bAr \r\n baZ\r")); + } +} diff --git a/tests/app/Elements/AdoptionTest.php b/tests/app/Elements/AdoptionTest.php new file mode 100644 index 0000000000..936f5f028d --- /dev/null +++ b/tests/app/Elements/AdoptionTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class Adoption + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\Adoption + */ +class AdoptionTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new Adoption('label'); + } +} diff --git a/tests/app/Elements/AdultChristeningTest.php b/tests/app/Elements/AdultChristeningTest.php new file mode 100644 index 0000000000..73aa0fe50b --- /dev/null +++ b/tests/app/Elements/AdultChristeningTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class AdultChristening + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\AdultChristening + */ +class AdultChristeningTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new AdultChristening('label'); + } +} diff --git a/tests/app/Elements/AgeAtEventTest.php b/tests/app/Elements/AgeAtEventTest.php new file mode 100644 index 0000000000..9a7973d069 --- /dev/null +++ b/tests/app/Elements/AgeAtEventTest.php @@ -0,0 +1,52 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class AgeAtEvent + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\AgeAtEvent + */ +class AgeAtEventTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new AgeAtEvent('label'); + } + + + /** + * @return void + */ + public function testCanonical(): void + { + self::assertSame('CHILD', self::$element->canonical("cHiLd")); + self::assertSame('INFANT', self::$element->canonical("iNfAnT ")); + self::assertSame('STILLBORN', self::$element->canonical(" sTiLlBoRn")); + self::assertSame('fish', self::$element->canonical("fIsH")); + self::assertSame('1y 2m 3d', self::$element->canonical("1Y 2M 3D")); + } +} diff --git a/tests/app/Elements/AncestralFileNumberTest.php b/tests/app/Elements/AncestralFileNumberTest.php new file mode 100644 index 0000000000..e9535fa0e6 --- /dev/null +++ b/tests/app/Elements/AncestralFileNumberTest.php @@ -0,0 +1,49 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class AncestralFileNumber + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\AncestralFileNumber + */ +class AncestralFileNumberTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new AncestralFileNumber('label'); + } + + /** + * @return void + */ + public function testCanonical(): void + { + self::assertSame('FOO BAR BAZ', self::$element->canonical("Foo bAr baZ")); + self::assertSame('FOO BAR BAZ', self::$element->canonical("\t Foo\t bAr \tbaZ\t ")); + self::assertSame('FOO BAR BAZ', self::$element->canonical("\nFoo \n\r bAr \r\n baZ\r")); + } +} diff --git a/tests/app/Elements/AnnulmentTest.php b/tests/app/Elements/AnnulmentTest.php new file mode 100644 index 0000000000..3ad558564a --- /dev/null +++ b/tests/app/Elements/AnnulmentTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class Annulment + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\Annulment + */ +class AnnulmentTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new Annulment('label'); + } +} diff --git a/tests/app/Elements/ApprovedSystemIdTest.php b/tests/app/Elements/ApprovedSystemIdTest.php new file mode 100644 index 0000000000..5feb1c46ce --- /dev/null +++ b/tests/app/Elements/ApprovedSystemIdTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class ApprovedSystemId + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\ApprovedSystemId + */ +class ApprovedSystemIdTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new ApprovedSystemId('label'); + } +} diff --git a/tests/app/Elements/AttributeDescriptorTest.php b/tests/app/Elements/AttributeDescriptorTest.php new file mode 100644 index 0000000000..8874e37035 --- /dev/null +++ b/tests/app/Elements/AttributeDescriptorTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class AttributeDescriptor + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\AttributeDescriptor + */ +class AttributeDescriptorTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new AttributeDescriptor('label'); + } +} diff --git a/tests/app/Elements/AutomatedRecordIdTest.php b/tests/app/Elements/AutomatedRecordIdTest.php new file mode 100644 index 0000000000..701121047b --- /dev/null +++ b/tests/app/Elements/AutomatedRecordIdTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class AutomatedRecordId + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\AutomatedRecordId + */ +class AutomatedRecordIdTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new AutomatedRecordId('label'); + } +} diff --git a/tests/app/Elements/BaptismTest.php b/tests/app/Elements/BaptismTest.php new file mode 100644 index 0000000000..adf7e89082 --- /dev/null +++ b/tests/app/Elements/BaptismTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class Baptism + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\Baptism + */ +class BaptismTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new Baptism('label'); + } +} diff --git a/tests/app/Elements/BarMitzvahTest.php b/tests/app/Elements/BarMitzvahTest.php new file mode 100644 index 0000000000..0876d81401 --- /dev/null +++ b/tests/app/Elements/BarMitzvahTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class BarMitzvah + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\BarMitzvah + */ +class BarMitzvahTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new BarMitzvah('label'); + } +} diff --git a/tests/app/Elements/BasMitzvahTest.php b/tests/app/Elements/BasMitzvahTest.php new file mode 100644 index 0000000000..ccb3654a68 --- /dev/null +++ b/tests/app/Elements/BasMitzvahTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class BasMitzvah + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\BasMitzvah + */ +class BasMitzvahTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new BasMitzvah('label'); + } +} diff --git a/tests/app/Elements/BirthTest.php b/tests/app/Elements/BirthTest.php new file mode 100644 index 0000000000..a384eb106a --- /dev/null +++ b/tests/app/Elements/BirthTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class Birth + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\Birth + */ +class BirthTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new Birth('label'); + } +} diff --git a/tests/app/Elements/BlessingTest.php b/tests/app/Elements/BlessingTest.php new file mode 100644 index 0000000000..cf8fa82e69 --- /dev/null +++ b/tests/app/Elements/BlessingTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class Blessing + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\Blessing + */ +class BlessingTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new Blessing('label'); + } +} diff --git a/tests/app/Elements/BurialTest.php b/tests/app/Elements/BurialTest.php new file mode 100644 index 0000000000..ed44353a92 --- /dev/null +++ b/tests/app/Elements/BurialTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class Burial + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\Burial + */ +class BurialTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new Burial('label'); + } +} diff --git a/tests/app/Elements/CasteNameTest.php b/tests/app/Elements/CasteNameTest.php new file mode 100644 index 0000000000..3e4515deac --- /dev/null +++ b/tests/app/Elements/CasteNameTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class CasteName + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\CasteName + */ +class CasteNameTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new CasteName('label'); + } +} diff --git a/tests/app/Elements/CauseOfEventTest.php b/tests/app/Elements/CauseOfEventTest.php new file mode 100644 index 0000000000..e70b491194 --- /dev/null +++ b/tests/app/Elements/CauseOfEventTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class CauseOfEvent + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\CauseOfEvent + */ +class CauseOfEventTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new CauseOfEvent('label'); + } +} diff --git a/tests/app/Elements/CensusTest.php b/tests/app/Elements/CensusTest.php new file mode 100644 index 0000000000..4add6db1e4 --- /dev/null +++ b/tests/app/Elements/CensusTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class Census + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\Census + */ +class CensusTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new Census('label'); + } +} diff --git a/tests/app/Elements/CertaintyAssessmentTest.php b/tests/app/Elements/CertaintyAssessmentTest.php new file mode 100644 index 0000000000..fdde4d0c8c --- /dev/null +++ b/tests/app/Elements/CertaintyAssessmentTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class CertaintyAssessment + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\CertaintyAssessment + */ +class CertaintyAssessmentTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new CertaintyAssessment('label'); + } +} diff --git a/tests/app/Elements/ChangeDateTest.php b/tests/app/Elements/ChangeDateTest.php new file mode 100644 index 0000000000..743725743b --- /dev/null +++ b/tests/app/Elements/ChangeDateTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class ChangeDate + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\ChangeDate + */ +class ChangeDateTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new ChangeDate('label'); + } +} diff --git a/tests/app/Elements/ChangeTest.php b/tests/app/Elements/ChangeTest.php new file mode 100644 index 0000000000..f5e8e42456 --- /dev/null +++ b/tests/app/Elements/ChangeTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class Change + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\Change + */ +class ChangeTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new Change('label'); + } +} diff --git a/tests/app/Elements/CharacterSetTest.php b/tests/app/Elements/CharacterSetTest.php new file mode 100644 index 0000000000..bc9db45e05 --- /dev/null +++ b/tests/app/Elements/CharacterSetTest.php @@ -0,0 +1,49 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class CharacterSet + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\CharacterSet + */ +class CharacterSetTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new CharacterSet('label'); + } + + /** + * @return void + */ + public function testCanonical(): void + { + self::assertSame('FOO BAR BAZ', self::$element->canonical("Foo bAr baZ")); + self::assertSame('FOO BAR BAZ', self::$element->canonical("\t Foo\t bAr \tbaZ\t ")); + self::assertSame('FOO BAR BAZ', self::$element->canonical("\nFoo \n\r bAr \r\n baZ\r")); + } +} diff --git a/tests/app/Elements/ChildLinkageStatusTest.php b/tests/app/Elements/ChildLinkageStatusTest.php new file mode 100644 index 0000000000..d1bbf346b3 --- /dev/null +++ b/tests/app/Elements/ChildLinkageStatusTest.php @@ -0,0 +1,49 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class ChildLinkageStatus + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\ChildLinkageStatus + */ +class ChildLinkageStatusTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new ChildLinkageStatus('label'); + } + + /** + * @return void + */ + public function testCanonical(): void + { + self::assertSame('foo bar baz', self::$element->canonical("Foo bAr baZ")); + self::assertSame('foo bar baz', self::$element->canonical("\t Foo\t bAr \tbaZ\t ")); + self::assertSame('foo bar baz', self::$element->canonical("\nFoo \n\r bAr \r\n baZ\r")); + } +} diff --git a/tests/app/Elements/ChristeningTest.php b/tests/app/Elements/ChristeningTest.php new file mode 100644 index 0000000000..f797e212fb --- /dev/null +++ b/tests/app/Elements/ChristeningTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class Christening + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\Christening + */ +class ChristeningTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new Christening('label'); + } +} diff --git a/tests/app/Elements/ConfirmationTest.php b/tests/app/Elements/ConfirmationTest.php new file mode 100644 index 0000000000..0f2e5d7254 --- /dev/null +++ b/tests/app/Elements/ConfirmationTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class Confirmation + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\Confirmation + */ +class ConfirmationTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new Confirmation('label'); + } +} diff --git a/tests/app/Elements/ContentDescriptionTest.php b/tests/app/Elements/ContentDescriptionTest.php new file mode 100644 index 0000000000..7427d727e8 --- /dev/null +++ b/tests/app/Elements/ContentDescriptionTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class ContentDescription + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\ContentDescription + */ +class ContentDescriptionTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new ContentDescription('label'); + } +} diff --git a/tests/app/Elements/CopyrightFileTest.php b/tests/app/Elements/CopyrightFileTest.php new file mode 100644 index 0000000000..94db83f3ed --- /dev/null +++ b/tests/app/Elements/CopyrightFileTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class CopyrightFile + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\CopyrightFile + */ +class CopyrightFileTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new CopyrightFile('label'); + } +} diff --git a/tests/app/Elements/CopyrightSourceDataTest.php b/tests/app/Elements/CopyrightSourceDataTest.php new file mode 100644 index 0000000000..ef51289cc0 --- /dev/null +++ b/tests/app/Elements/CopyrightSourceDataTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class CopyrightSourceData + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\CopyrightSourceData + */ +class CopyrightSourceDataTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new CopyrightSourceData('label'); + } +} diff --git a/tests/app/Elements/CountOfChildrenTest.php b/tests/app/Elements/CountOfChildrenTest.php new file mode 100644 index 0000000000..50d8c370c2 --- /dev/null +++ b/tests/app/Elements/CountOfChildrenTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class CountOfChildren + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\CountOfChildren + */ +class CountOfChildrenTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new CountOfChildren('label'); + } +} diff --git a/tests/app/Elements/CountOfMarriagesTest.php b/tests/app/Elements/CountOfMarriagesTest.php new file mode 100644 index 0000000000..d1f4105222 --- /dev/null +++ b/tests/app/Elements/CountOfMarriagesTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class CountOfMarriages + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\CountOfMarriages + */ +class CountOfMarriagesTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new CountOfMarriages('label'); + } +} diff --git a/tests/app/Elements/CremationTest.php b/tests/app/Elements/CremationTest.php new file mode 100644 index 0000000000..bb53ab569b --- /dev/null +++ b/tests/app/Elements/CremationTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class Cremation + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\Cremation + */ +class CremationTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new Cremation('label'); + } +} diff --git a/tests/app/Elements/CustomElementTest.php b/tests/app/Elements/CustomElementTest.php new file mode 100644 index 0000000000..8fe6af9392 --- /dev/null +++ b/tests/app/Elements/CustomElementTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class CustomElement + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\CustomElement + */ +class CustomElementTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new CustomElement('label'); + } +} diff --git a/tests/app/Elements/CustomEventTest.php b/tests/app/Elements/CustomEventTest.php new file mode 100644 index 0000000000..d5f434689c --- /dev/null +++ b/tests/app/Elements/CustomEventTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class CustomEvent + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\CustomEvent + */ +class CustomEventTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new CustomEvent('label'); + } +} diff --git a/tests/app/Elements/CustomFactTest.php b/tests/app/Elements/CustomFactTest.php new file mode 100644 index 0000000000..be21cb37af --- /dev/null +++ b/tests/app/Elements/CustomFactTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class CustomFact + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\CustomFact + */ +class CustomFactTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new CustomFact('label'); + } +} diff --git a/tests/app/Elements/DateLdsOrdTest.php b/tests/app/Elements/DateLdsOrdTest.php new file mode 100644 index 0000000000..73a4f180c5 --- /dev/null +++ b/tests/app/Elements/DateLdsOrdTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class DateLdsOrd + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\DateLdsOrd + */ +class DateLdsOrdTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new DateLdsOrd('label'); + } +} diff --git a/tests/app/Elements/DateValueTest.php b/tests/app/Elements/DateValueTest.php index bf31ab99c1..ffe659a1eb 100644 --- a/tests/app/Elements/DateValueTest.php +++ b/tests/app/Elements/DateValueTest.php @@ -19,26 +19,32 @@ declare(strict_types=1); namespace Fisharebest\Webtrees\Elements; -use Fisharebest\Webtrees\TestCase; - /** * Test harness for the class DateValue * * @covers \Fisharebest\Webtrees\Elements\AbstractElement * @covers \Fisharebest\Webtrees\Elements\DateValue */ -class DateValueTest extends TestCase +class DateValueTest extends AbstractElementTest { /** - * @return void + * Standard tests for all elements. */ - public function testEscape(): void + public static function setupBeforeClass(): void { - $element = new DateValue(''); + parent::setUpBeforeClass(); + + static::$element = new DateValue('label'); + } + /** + * @return void + */ + public function testEscapeAtSigns(): void + { self::assertSame( - '@#DJULAIN@ 44 B.C. INT (says test@@example.com)', - $element->escape('@#DJULAIN@ 44 B.C. INT (says test@example.com)') + '@#DJULIAN@ 44 B.C. INT (says test@@example.com)', + static::$element->escape('@#DJULIAN@ 44 B.C. INT (says test@example.com)') ); } } diff --git a/tests/app/Elements/DeathTest.php b/tests/app/Elements/DeathTest.php new file mode 100644 index 0000000000..780a222b3d --- /dev/null +++ b/tests/app/Elements/DeathTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class Death + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\Death + */ +class DeathTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new Death('label'); + } +} diff --git a/tests/app/Elements/DemographicDataTypeTest.php b/tests/app/Elements/DemographicDataTypeTest.php new file mode 100644 index 0000000000..43c64a6a7f --- /dev/null +++ b/tests/app/Elements/DemographicDataTypeTest.php @@ -0,0 +1,49 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class DemographicDataType + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\DemographicDataType + */ +class DemographicDataTypeTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new DemographicDataType('label'); + } + + /** + * @return void + */ + public function testCanonical(): void + { + self::assertSame('FOO BAR BAZ', self::$element->canonical("Foo bAr baZ")); + self::assertSame('FOO BAR BAZ', self::$element->canonical("\t Foo\t bAr \tbaZ\t ")); + self::assertSame('FOO BAR BAZ', self::$element->canonical("\nFoo \n\r bAr \r\n baZ\r")); + } +} diff --git a/tests/app/Elements/DescriptiveTitleTest.php b/tests/app/Elements/DescriptiveTitleTest.php new file mode 100644 index 0000000000..7f91183dc7 --- /dev/null +++ b/tests/app/Elements/DescriptiveTitleTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class DescriptiveTitle + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\DescriptiveTitle + */ +class DescriptiveTitleTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new DescriptiveTitle('label'); + } +} diff --git a/tests/app/Elements/DivorceFiledTest.php b/tests/app/Elements/DivorceFiledTest.php new file mode 100644 index 0000000000..34ce69bf2a --- /dev/null +++ b/tests/app/Elements/DivorceFiledTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class DivorceFiled + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\DivorceFiled + */ +class DivorceFiledTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new DivorceFiled('label'); + } +} diff --git a/tests/app/Elements/DivorceTest.php b/tests/app/Elements/DivorceTest.php new file mode 100644 index 0000000000..270e5561f9 --- /dev/null +++ b/tests/app/Elements/DivorceTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class Divorce + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\Divorce + */ +class DivorceTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new Divorce('label'); + } +} diff --git a/tests/app/Elements/EmigrationTest.php b/tests/app/Elements/EmigrationTest.php new file mode 100644 index 0000000000..a9111f34c6 --- /dev/null +++ b/tests/app/Elements/EmigrationTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class Emigration + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\Emigration + */ +class EmigrationTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new Emigration('label'); + } +} diff --git a/tests/app/Elements/EmptyElementTest.php b/tests/app/Elements/EmptyElementTest.php new file mode 100644 index 0000000000..0b670d0207 --- /dev/null +++ b/tests/app/Elements/EmptyElementTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class EmptyElement + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\EmptyElement + */ +class EmptyElementTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new EmptyElement('label'); + } +} diff --git a/tests/app/Elements/EngagementTest.php b/tests/app/Elements/EngagementTest.php new file mode 100644 index 0000000000..a792110db0 --- /dev/null +++ b/tests/app/Elements/EngagementTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class Engagement + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\Engagement + */ +class EngagementTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new Engagement('label'); + } +} diff --git a/tests/app/Elements/EntryRecordingDateTest.php b/tests/app/Elements/EntryRecordingDateTest.php new file mode 100644 index 0000000000..b5d7bcd505 --- /dev/null +++ b/tests/app/Elements/EntryRecordingDateTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class EntryRecordingDate + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\EntryRecordingDate + */ +class EntryRecordingDateTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new EntryRecordingDate('label'); + } +} diff --git a/tests/app/Elements/EventAttributeTypeTest.php b/tests/app/Elements/EventAttributeTypeTest.php new file mode 100644 index 0000000000..e9b27fcf7b --- /dev/null +++ b/tests/app/Elements/EventAttributeTypeTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class EventAttributeType + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\EventAttributeType + */ +class EventAttributeTypeTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new EventAttributeType('label'); + } +} diff --git a/tests/app/Elements/EventDescriptorTest.php b/tests/app/Elements/EventDescriptorTest.php new file mode 100644 index 0000000000..f840fa78b7 --- /dev/null +++ b/tests/app/Elements/EventDescriptorTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class EventDescriptor + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\EventDescriptor + */ +class EventDescriptorTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new EventDescriptor('label'); + } +} diff --git a/tests/app/Elements/EventOrFactClassificationTest.php b/tests/app/Elements/EventOrFactClassificationTest.php new file mode 100644 index 0000000000..403c6280e3 --- /dev/null +++ b/tests/app/Elements/EventOrFactClassificationTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class EventOrFactClassification + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\EventOrFactClassification + */ +class EventOrFactClassificationTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new EventOrFactClassification('label'); + } +} diff --git a/tests/app/Elements/EventTypeCitedFromTest.php b/tests/app/Elements/EventTypeCitedFromTest.php new file mode 100644 index 0000000000..0fca8b4f63 --- /dev/null +++ b/tests/app/Elements/EventTypeCitedFromTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class EventTypeCitedFrom + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\EventTypeCitedFrom + */ +class EventTypeCitedFromTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new EventTypeCitedFrom('label'); + } +} diff --git a/tests/app/Elements/EventsRecordedTest.php b/tests/app/Elements/EventsRecordedTest.php new file mode 100644 index 0000000000..65a2f53640 --- /dev/null +++ b/tests/app/Elements/EventsRecordedTest.php @@ -0,0 +1,48 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class EventsRecorded + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\EventsRecorded + */ +class EventsRecordedTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new EventsRecorded('label'); + } + + /** + * @return void + */ + public function testCanonical(): void + { + self::assertSame('FOO,BAR,BAZ', self::$element->canonical("Foo , bAr, baZ")); + self::assertSame('FOO,BAR,BAZ', self::$element->canonical(", Foo, bAr ,baZ, ")); + } +} diff --git a/tests/app/Elements/FamilyRecordTest.php b/tests/app/Elements/FamilyRecordTest.php new file mode 100644 index 0000000000..8b09969a04 --- /dev/null +++ b/tests/app/Elements/FamilyRecordTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class FamilyRecord + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\FamilyRecord + */ +class FamilyRecordTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new FamilyRecord('label'); + } +} diff --git a/tests/app/Elements/FamilyStatusTextTest.php b/tests/app/Elements/FamilyStatusTextTest.php new file mode 100644 index 0000000000..76b34dd107 --- /dev/null +++ b/tests/app/Elements/FamilyStatusTextTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class FamilyStatusText + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\FamilyStatusText + */ +class FamilyStatusTextTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new FamilyStatusText('label'); + } +} diff --git a/tests/app/Elements/FileNameTest.php b/tests/app/Elements/FileNameTest.php new file mode 100644 index 0000000000..19905f59e2 --- /dev/null +++ b/tests/app/Elements/FileNameTest.php @@ -0,0 +1,49 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class FileName + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\FileName + */ +class FileNameTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new FileName('label'); + } + + /** + * @return void + */ + public function testCanonical(): void + { + self::assertSame('Foo bAr baZ', self::$element->canonical("Foo bAr baZ")); + self::assertSame(' Foo bAr baZ ', self::$element->canonical("\t Foo\t bAr \tbaZ\t ")); + self::assertSame('Foo bAr baZ', self::$element->canonical("\nFoo \n\r bAr \r\n baZ\r")); + } +} diff --git a/tests/app/Elements/FirstCommunionTest.php b/tests/app/Elements/FirstCommunionTest.php new file mode 100644 index 0000000000..7f47f6694a --- /dev/null +++ b/tests/app/Elements/FirstCommunionTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class FirstCommunion + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\FirstCommunion + */ +class FirstCommunionTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new FirstCommunion('label'); + } +} diff --git a/tests/app/Elements/FormTest.php b/tests/app/Elements/FormTest.php new file mode 100644 index 0000000000..b35bbc524e --- /dev/null +++ b/tests/app/Elements/FormTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class Form + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\Form + */ +class FormTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new Form('label'); + } +} diff --git a/tests/app/Elements/GedcomTest.php b/tests/app/Elements/GedcomTest.php new file mode 100644 index 0000000000..05066dd4c4 --- /dev/null +++ b/tests/app/Elements/GedcomTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class Gedcom + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\Gedcom + */ +class GedcomTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new Gedcom('label'); + } +} diff --git a/tests/app/Elements/GenerationsOfAncestorsTest.php b/tests/app/Elements/GenerationsOfAncestorsTest.php new file mode 100644 index 0000000000..006d3dfb76 --- /dev/null +++ b/tests/app/Elements/GenerationsOfAncestorsTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class GenerationsOfAncestors + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\GenerationsOfAncestors + */ +class GenerationsOfAncestorsTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new GenerationsOfAncestors('label'); + } +} diff --git a/tests/app/Elements/GenerationsOfDescendantsTest.php b/tests/app/Elements/GenerationsOfDescendantsTest.php new file mode 100644 index 0000000000..295e49d2f8 --- /dev/null +++ b/tests/app/Elements/GenerationsOfDescendantsTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class GenerationsOfDescendants + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\GenerationsOfDescendants + */ +class GenerationsOfDescendantsTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new GenerationsOfDescendants('label'); + } +} diff --git a/tests/app/Elements/GovIdTypeTest.php b/tests/app/Elements/GovIdTypeTest.php new file mode 100644 index 0000000000..a0a87d7b6d --- /dev/null +++ b/tests/app/Elements/GovIdTypeTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class GovIdType + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\GovIdType + */ +class GovIdTypeTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new GovIdType('label'); + } +} diff --git a/tests/app/Elements/GovIdentifierTest.php b/tests/app/Elements/GovIdentifierTest.php new file mode 100644 index 0000000000..123adaea87 --- /dev/null +++ b/tests/app/Elements/GovIdentifierTest.php @@ -0,0 +1,49 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class GovIdentifier + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\GovIdentifier + */ +class GovIdentifierTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new GovIdentifier('label'); + } + + /** + * @return void + */ + public function testCanonical(): void + { + self::assertSame('FOO BAR BAZ', self::$element->canonical("Foo bAr baZ")); + self::assertSame('FOO BAR BAZ', self::$element->canonical("\t Foo\t bAr \tbaZ\t ")); + self::assertSame('FOO BAR BAZ', self::$element->canonical("\nFoo \n\r bAr \r\n baZ\r")); + } +} diff --git a/tests/app/Elements/GraduationTest.php b/tests/app/Elements/GraduationTest.php new file mode 100644 index 0000000000..6f959b99d1 --- /dev/null +++ b/tests/app/Elements/GraduationTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class Graduation + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\Graduation + */ +class GraduationTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new Graduation('label'); + } +} diff --git a/tests/app/Elements/HeaderRecordTest.php b/tests/app/Elements/HeaderRecordTest.php new file mode 100644 index 0000000000..a181839743 --- /dev/null +++ b/tests/app/Elements/HeaderRecordTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class HeaderRecord + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\HeaderRecord + */ +class HeaderRecordTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new HeaderRecord('label'); + } +} diff --git a/tests/app/Elements/HierarchicalRelationshipTest.php b/tests/app/Elements/HierarchicalRelationshipTest.php new file mode 100644 index 0000000000..312533728e --- /dev/null +++ b/tests/app/Elements/HierarchicalRelationshipTest.php @@ -0,0 +1,49 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class HierarchicalRelationship + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\HierarchicalRelationship + */ +class HierarchicalRelationshipTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new HierarchicalRelationship('label'); + } + + /** + * @return void + */ + public function testCanonical(): void + { + self::assertSame('FOO BAR BAZ', self::$element->canonical("Foo bAr baZ")); + self::assertSame('FOO BAR BAZ', self::$element->canonical("\t Foo\t bAr \tbaZ\t ")); + self::assertSame('FOO BAR BAZ', self::$element->canonical("\nFoo \n\r bAr \r\n baZ\r")); + } +} diff --git a/tests/app/Elements/ImmigrationTest.php b/tests/app/Elements/ImmigrationTest.php new file mode 100644 index 0000000000..d50cacd37c --- /dev/null +++ b/tests/app/Elements/ImmigrationTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class Immigration + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\Immigration + */ +class ImmigrationTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new Immigration('label'); + } +} diff --git a/tests/app/Elements/IndividualRecordTest.php b/tests/app/Elements/IndividualRecordTest.php new file mode 100644 index 0000000000..481b2d12bc --- /dev/null +++ b/tests/app/Elements/IndividualRecordTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class IndividualRecord + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\IndividualRecord + */ +class IndividualRecordTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new IndividualRecord('label'); + } +} diff --git a/tests/app/Elements/LanguageIdTest.php b/tests/app/Elements/LanguageIdTest.php index 35b024cf44..32a3641b1f 100644 --- a/tests/app/Elements/LanguageIdTest.php +++ b/tests/app/Elements/LanguageIdTest.php @@ -27,18 +27,26 @@ use Fisharebest\Webtrees\TestCase; * @covers \Fisharebest\Webtrees\Elements\AbstractElement * @covers \Fisharebest\Webtrees\Elements\LanguageId */ -class LanguageIdTest extends TestCase +class LanguageIdTest extends AbstractElementTest { /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + static::$element = new LanguageId('label'); + } + + /** * @return void */ public function testCanonical(): void { - $element = new LanguageId(''); - - self::assertSame('English', $element->canonical("\t English\t ")); - self::assertSame('Klingon', $element->canonical('kLiNgOn')); - self::assertSame('Anglo-Saxon', $element->canonical('anglo-saxon')); - self::assertSame('Catalan_Spn', $element->canonical('CATALAN_SPN')); + self::assertSame('English', self::$element->canonical("\t English\t ")); + self::assertSame('Klingon', self::$element->canonical('kLiNgOn')); + self::assertSame('Anglo-Saxon', self::$element->canonical('anglo-saxon')); + self::assertSame('Catalan_Spn', self::$element->canonical('CATALAN_SPN')); } } diff --git a/tests/app/Elements/LdsBaptismDateStatusTest.php b/tests/app/Elements/LdsBaptismDateStatusTest.php new file mode 100644 index 0000000000..a26339d6bd --- /dev/null +++ b/tests/app/Elements/LdsBaptismDateStatusTest.php @@ -0,0 +1,49 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class LdsBaptismDateStatus + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\LdsBaptismDateStatus + */ +class LdsBaptismDateStatusTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new LdsBaptismDateStatus('label'); + } + + /** + * @return void + */ + public function testCanonical(): void + { + self::assertSame('FOO BAR BAZ', self::$element->canonical("Foo bAr baZ")); + self::assertSame('FOO BAR BAZ', self::$element->canonical("\t Foo\t bAr \tbaZ\t ")); + self::assertSame('FOO BAR BAZ', self::$element->canonical("\nFoo \n\r bAr \r\n baZ\r")); + } +} diff --git a/tests/app/Elements/LdsBaptismTest.php b/tests/app/Elements/LdsBaptismTest.php new file mode 100644 index 0000000000..4a6c101aeb --- /dev/null +++ b/tests/app/Elements/LdsBaptismTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class LdsBaptism + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\LdsBaptism + */ +class LdsBaptismTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new LdsBaptism('label'); + } +} diff --git a/tests/app/Elements/LdsChildSealingDateStatusTest.php b/tests/app/Elements/LdsChildSealingDateStatusTest.php new file mode 100644 index 0000000000..d0d599499f --- /dev/null +++ b/tests/app/Elements/LdsChildSealingDateStatusTest.php @@ -0,0 +1,49 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class LdsChildSealingDateStatus + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\LdsChildSealingDateStatus + */ +class LdsChildSealingDateStatusTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new LdsChildSealingDateStatus('label'); + } + + /** + * @return void + */ + public function testCanonical(): void + { + self::assertSame('FOO BAR BAZ', self::$element->canonical("Foo bAr baZ")); + self::assertSame('FOO BAR BAZ', self::$element->canonical("\t Foo\t bAr \tbaZ\t ")); + self::assertSame('FOO BAR BAZ', self::$element->canonical("\nFoo \n\r bAr \r\n baZ\r")); + } +} diff --git a/tests/app/Elements/LdsChildSealingTest.php b/tests/app/Elements/LdsChildSealingTest.php new file mode 100644 index 0000000000..4e78f68177 --- /dev/null +++ b/tests/app/Elements/LdsChildSealingTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class LdsChildSealing + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\LdsChildSealing + */ +class LdsChildSealingTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new LdsChildSealing('label'); + } +} diff --git a/tests/app/Elements/LdsConfirmationTest.php b/tests/app/Elements/LdsConfirmationTest.php new file mode 100644 index 0000000000..df14e58cd8 --- /dev/null +++ b/tests/app/Elements/LdsConfirmationTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class LdsConfirmation + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\LdsConfirmation + */ +class LdsConfirmationTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new LdsConfirmation('label'); + } +} diff --git a/tests/app/Elements/LdsEndowmentDateStatusTest.php b/tests/app/Elements/LdsEndowmentDateStatusTest.php new file mode 100644 index 0000000000..0f050c7340 --- /dev/null +++ b/tests/app/Elements/LdsEndowmentDateStatusTest.php @@ -0,0 +1,49 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class LdsEndowmentDateStatus + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\LdsEndowmentDateStatus + */ +class LdsEndowmentDateStatusTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new LdsEndowmentDateStatus('label'); + } + + /** + * @return void + */ + public function testCanonical(): void + { + self::assertSame('FOO BAR BAZ', self::$element->canonical("Foo bAr baZ")); + self::assertSame('FOO BAR BAZ', self::$element->canonical("\t Foo\t bAr \tbaZ\t ")); + self::assertSame('FOO BAR BAZ', self::$element->canonical("\nFoo \n\r bAr \r\n baZ\r")); + } +} diff --git a/tests/app/Elements/LdsEndowmentTest.php b/tests/app/Elements/LdsEndowmentTest.php new file mode 100644 index 0000000000..caf17f200a --- /dev/null +++ b/tests/app/Elements/LdsEndowmentTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class LdsEndowment + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\LdsEndowment + */ +class LdsEndowmentTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new LdsEndowment('label'); + } +} diff --git a/tests/app/Elements/LdsSpouseSealingDateStatusTest.php b/tests/app/Elements/LdsSpouseSealingDateStatusTest.php new file mode 100644 index 0000000000..8df7e710d5 --- /dev/null +++ b/tests/app/Elements/LdsSpouseSealingDateStatusTest.php @@ -0,0 +1,49 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class LdsSpouseSealingDateStatus + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\LdsSpouseSealingDateStatus + */ +class LdsSpouseSealingDateStatusTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new LdsSpouseSealingDateStatus('label'); + } + + /** + * @return void + */ + public function testCanonical(): void + { + self::assertSame('FOO BAR BAZ', self::$element->canonical("Foo bAr baZ")); + self::assertSame('FOO BAR BAZ', self::$element->canonical("\t Foo\t bAr \tbaZ\t ")); + self::assertSame('FOO BAR BAZ', self::$element->canonical("\nFoo \n\r bAr \r\n baZ\r")); + } +} diff --git a/tests/app/Elements/LdsSpouseSealingTest.php b/tests/app/Elements/LdsSpouseSealingTest.php new file mode 100644 index 0000000000..0c60174e80 --- /dev/null +++ b/tests/app/Elements/LdsSpouseSealingTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class LdsSpouseSealing + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\LdsSpouseSealing + */ +class LdsSpouseSealingTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new LdsSpouseSealing('label'); + } +} diff --git a/tests/app/Elements/LocationRecordTest.php b/tests/app/Elements/LocationRecordTest.php new file mode 100644 index 0000000000..9d7622372b --- /dev/null +++ b/tests/app/Elements/LocationRecordTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class LocationRecord + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\LocationRecord + */ +class LocationRecordTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new LocationRecord('label'); + } +} diff --git a/tests/app/Elements/MaidenheadLocatorTest.php b/tests/app/Elements/MaidenheadLocatorTest.php new file mode 100644 index 0000000000..b058c06d73 --- /dev/null +++ b/tests/app/Elements/MaidenheadLocatorTest.php @@ -0,0 +1,55 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class MaidenheadLocator + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\MaidenheadLocator + */ +class MaidenheadLocatorTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new MaidenheadLocator('label'); + } + + + /** + * @return void + */ + public function testCanonical(): void + { + self::assertSame('AB', self::$element->canonical("ab")); + self::assertSame('AB', self::$element->canonical("AB")); + self::assertSame('AB12', self::$element->canonical("ab12")); + self::assertSame('AB12', self::$element->canonical("AB12")); + self::assertSame('AB12cd', self::$element->canonical("ab12cd")); + self::assertSame('AB12cd', self::$element->canonical("AB12CD")); + self::assertSame('AB12cd34', self::$element->canonical("ab12cd34")); + self::assertSame('AB12cd34', self::$element->canonical("AB12CD34")); + } +} diff --git a/tests/app/Elements/MarriageBannsTest.php b/tests/app/Elements/MarriageBannsTest.php new file mode 100644 index 0000000000..0a69008a91 --- /dev/null +++ b/tests/app/Elements/MarriageBannsTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class MarriageBanns + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\MarriageBanns + */ +class MarriageBannsTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new MarriageBanns('label'); + } +} diff --git a/tests/app/Elements/MarriageContractTest.php b/tests/app/Elements/MarriageContractTest.php new file mode 100644 index 0000000000..b97fa76df9 --- /dev/null +++ b/tests/app/Elements/MarriageContractTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class MarriageContract + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\MarriageContract + */ +class MarriageContractTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new MarriageContract('label'); + } +} diff --git a/tests/app/Elements/MarriageLicenceTest.php b/tests/app/Elements/MarriageLicenceTest.php new file mode 100644 index 0000000000..189fa17f94 --- /dev/null +++ b/tests/app/Elements/MarriageLicenceTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class MarriageLicence + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\MarriageLicence + */ +class MarriageLicenceTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new MarriageLicence('label'); + } +} diff --git a/tests/app/Elements/MarriageSettlementTest.php b/tests/app/Elements/MarriageSettlementTest.php new file mode 100644 index 0000000000..35257361e3 --- /dev/null +++ b/tests/app/Elements/MarriageSettlementTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class MarriageSettlement + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\MarriageSettlement + */ +class MarriageSettlementTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new MarriageSettlement('label'); + } +} diff --git a/tests/app/Elements/MarriageTest.php b/tests/app/Elements/MarriageTest.php new file mode 100644 index 0000000000..ce37225478 --- /dev/null +++ b/tests/app/Elements/MarriageTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class Marriage + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\Marriage + */ +class MarriageTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new Marriage('label'); + } +} diff --git a/tests/app/Elements/MarriageTypeTest.php b/tests/app/Elements/MarriageTypeTest.php new file mode 100644 index 0000000000..294e8e017f --- /dev/null +++ b/tests/app/Elements/MarriageTypeTest.php @@ -0,0 +1,49 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class MarriageType + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\MarriageType + */ +class MarriageTypeTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new MarriageType('label'); + } + + /** + * @return void + */ + public function testCanonical(): void + { + self::assertSame('Foo bar baz', self::$element->canonical("Foo bAr baZ")); + self::assertSame('Foo bar baz', self::$element->canonical("\t Foo\t bAr \tbaZ\t ")); + self::assertSame('Foo bar baz', self::$element->canonical("\nFoo \n\r bAr \r\n baZ\r")); + } +} diff --git a/tests/app/Elements/MediaRecordTest.php b/tests/app/Elements/MediaRecordTest.php new file mode 100644 index 0000000000..4de468fb0c --- /dev/null +++ b/tests/app/Elements/MediaRecordTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class MediaRecord + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\MediaRecord + */ +class MediaRecordTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new MediaRecord('label'); + } +} diff --git a/tests/app/Elements/MultimediaFileReferenceTest.php b/tests/app/Elements/MultimediaFileReferenceTest.php new file mode 100644 index 0000000000..426acc8e92 --- /dev/null +++ b/tests/app/Elements/MultimediaFileReferenceTest.php @@ -0,0 +1,49 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class MultimediaFileReference + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\MultimediaFileReference + */ +class MultimediaFileReferenceTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new MultimediaFileReference('label'); + } + + /** + * @return void + */ + public function testCanonical(): void + { + self::assertSame('Foo bAr baZ', self::$element->canonical("Foo bAr baZ")); + self::assertSame(' Foo bAr baZ ', self::$element->canonical("\t Foo\t bAr \tbaZ\t ")); + self::assertSame('Foo bAr baZ', self::$element->canonical("\nFoo \n\r bAr \r\n baZ\r")); + } +} diff --git a/tests/app/Elements/MultimediaFormatTest.php b/tests/app/Elements/MultimediaFormatTest.php new file mode 100644 index 0000000000..37ac21078c --- /dev/null +++ b/tests/app/Elements/MultimediaFormatTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class MultimediaFormat + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\MultimediaFormat + */ +class MultimediaFormatTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new MultimediaFormat('label'); + } +} diff --git a/tests/app/Elements/NameOfBusinessTest.php b/tests/app/Elements/NameOfBusinessTest.php new file mode 100644 index 0000000000..4f897daf49 --- /dev/null +++ b/tests/app/Elements/NameOfBusinessTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class NameOfBusiness + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\NameOfBusiness + */ +class NameOfBusinessTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new NameOfBusiness('label'); + } +} diff --git a/tests/app/Elements/NameOfFamilyFileTest.php b/tests/app/Elements/NameOfFamilyFileTest.php new file mode 100644 index 0000000000..7c17277245 --- /dev/null +++ b/tests/app/Elements/NameOfFamilyFileTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class NameOfFamilyFile + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\NameOfFamilyFile + */ +class NameOfFamilyFileTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new NameOfFamilyFile('label'); + } +} diff --git a/tests/app/Elements/NameOfProductTest.php b/tests/app/Elements/NameOfProductTest.php new file mode 100644 index 0000000000..4b563bb7b7 --- /dev/null +++ b/tests/app/Elements/NameOfProductTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class NameOfProduct + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\NameOfProduct + */ +class NameOfProductTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new NameOfProduct('label'); + } +} diff --git a/tests/app/Elements/NameOfRepositoryTest.php b/tests/app/Elements/NameOfRepositoryTest.php new file mode 100644 index 0000000000..e668083c58 --- /dev/null +++ b/tests/app/Elements/NameOfRepositoryTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class NameOfRepository + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\NameOfRepository + */ +class NameOfRepositoryTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new NameOfRepository('label'); + } +} diff --git a/tests/app/Elements/NameOfSourceDataTest.php b/tests/app/Elements/NameOfSourceDataTest.php new file mode 100644 index 0000000000..9b4133b889 --- /dev/null +++ b/tests/app/Elements/NameOfSourceDataTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class NameOfSourceData + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\NameOfSourceData + */ +class NameOfSourceDataTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new NameOfSourceData('label'); + } +} diff --git a/tests/app/Elements/NamePersonalTest.php b/tests/app/Elements/NamePersonalTest.php new file mode 100644 index 0000000000..cdeae70d87 --- /dev/null +++ b/tests/app/Elements/NamePersonalTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class NamePersonal + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\NamePersonal + */ +class NamePersonalTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new NamePersonal('label'); + } +} diff --git a/tests/app/Elements/NamePhoneticVariationTest.php b/tests/app/Elements/NamePhoneticVariationTest.php new file mode 100644 index 0000000000..f88a94da24 --- /dev/null +++ b/tests/app/Elements/NamePhoneticVariationTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class NamePhoneticVariation + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\NamePhoneticVariation + */ +class NamePhoneticVariationTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new NamePhoneticVariation('label'); + } +} diff --git a/tests/app/Elements/NamePieceGivenTest.php b/tests/app/Elements/NamePieceGivenTest.php new file mode 100644 index 0000000000..a3c6f5ac3b --- /dev/null +++ b/tests/app/Elements/NamePieceGivenTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class NamePieceGiven + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\NamePieceGiven + */ +class NamePieceGivenTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new NamePieceGiven('label'); + } +} diff --git a/tests/app/Elements/NamePieceNicknameTest.php b/tests/app/Elements/NamePieceNicknameTest.php new file mode 100644 index 0000000000..6211c00b84 --- /dev/null +++ b/tests/app/Elements/NamePieceNicknameTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class NamePieceNickname + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\NamePieceNickname + */ +class NamePieceNicknameTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new NamePieceNickname('label'); + } +} diff --git a/tests/app/Elements/NamePiecePrefixTest.php b/tests/app/Elements/NamePiecePrefixTest.php new file mode 100644 index 0000000000..ec6fee6f53 --- /dev/null +++ b/tests/app/Elements/NamePiecePrefixTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class NamePiecePrefix + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\NamePiecePrefix + */ +class NamePiecePrefixTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new NamePiecePrefix('label'); + } +} diff --git a/tests/app/Elements/NamePieceSuffixTest.php b/tests/app/Elements/NamePieceSuffixTest.php new file mode 100644 index 0000000000..fd384dd859 --- /dev/null +++ b/tests/app/Elements/NamePieceSuffixTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class NamePieceSuffix + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\NamePieceSuffix + */ +class NamePieceSuffixTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new NamePieceSuffix('label'); + } +} diff --git a/tests/app/Elements/NamePieceSurnamePrefixTest.php b/tests/app/Elements/NamePieceSurnamePrefixTest.php new file mode 100644 index 0000000000..51d17926c0 --- /dev/null +++ b/tests/app/Elements/NamePieceSurnamePrefixTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class NamePieceSurnamePrefix + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\NamePieceSurnamePrefix + */ +class NamePieceSurnamePrefixTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new NamePieceSurnamePrefix('label'); + } +} diff --git a/tests/app/Elements/NamePieceSurnameTest.php b/tests/app/Elements/NamePieceSurnameTest.php new file mode 100644 index 0000000000..ac515534ad --- /dev/null +++ b/tests/app/Elements/NamePieceSurnameTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class NamePieceSurname + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\NamePieceSurname + */ +class NamePieceSurnameTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new NamePieceSurname('label'); + } +} diff --git a/tests/app/Elements/NameRomanizedVariationTest.php b/tests/app/Elements/NameRomanizedVariationTest.php new file mode 100644 index 0000000000..f8a713e964 --- /dev/null +++ b/tests/app/Elements/NameRomanizedVariationTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class NameRomanizedVariation + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\NameRomanizedVariation + */ +class NameRomanizedVariationTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new NameRomanizedVariation('label'); + } +} diff --git a/tests/app/Elements/NameTypeTest.php b/tests/app/Elements/NameTypeTest.php new file mode 100644 index 0000000000..42606d075d --- /dev/null +++ b/tests/app/Elements/NameTypeTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class NameType + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\NameType + */ +class NameTypeTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new NameType('label'); + } +} diff --git a/tests/app/Elements/NationOrTribalOriginTest.php b/tests/app/Elements/NationOrTribalOriginTest.php new file mode 100644 index 0000000000..3ab5d39a13 --- /dev/null +++ b/tests/app/Elements/NationOrTribalOriginTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class NationOrTribalOrigin + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\NationOrTribalOrigin + */ +class NationOrTribalOriginTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new NationOrTribalOrigin('label'); + } +} diff --git a/tests/app/Elements/NationalIdNumberTest.php b/tests/app/Elements/NationalIdNumberTest.php new file mode 100644 index 0000000000..013c47504e --- /dev/null +++ b/tests/app/Elements/NationalIdNumberTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class NationalIdNumber + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\NationalIdNumber + */ +class NationalIdNumberTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new NationalIdNumber('label'); + } +} diff --git a/tests/app/Elements/NaturalizationTest.php b/tests/app/Elements/NaturalizationTest.php new file mode 100644 index 0000000000..ac8d060512 --- /dev/null +++ b/tests/app/Elements/NaturalizationTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class Naturalization + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\Naturalization + */ +class NaturalizationTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new Naturalization('label'); + } +} diff --git a/tests/app/Elements/NobilityTypeTitleTest.php b/tests/app/Elements/NobilityTypeTitleTest.php new file mode 100644 index 0000000000..b977b5ca07 --- /dev/null +++ b/tests/app/Elements/NobilityTypeTitleTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class NobilityTypeTitle + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\NobilityTypeTitle + */ +class NobilityTypeTitleTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new NobilityTypeTitle('label'); + } +} diff --git a/tests/app/Elements/NoteRecordTest.php b/tests/app/Elements/NoteRecordTest.php new file mode 100644 index 0000000000..8028449b90 --- /dev/null +++ b/tests/app/Elements/NoteRecordTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class NoteRecord + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\NoteRecord + */ +class NoteRecordTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new NoteRecord('label'); + } +} diff --git a/tests/app/Elements/NoteStructureTest.php b/tests/app/Elements/NoteStructureTest.php new file mode 100644 index 0000000000..13ced2e2c1 --- /dev/null +++ b/tests/app/Elements/NoteStructureTest.php @@ -0,0 +1,49 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class NoteStructure + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\NoteStructure + */ +class NoteStructureTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new NoteStructure('label'); + } + + /** + * @return void + */ + public function testCanonical(): void + { + self::assertSame('Foo bAr baZ', self::$element->canonical("Foo bAr baZ")); + self::assertSame(' Foo bAr baZ ', self::$element->canonical("\t Foo\t bAr \tbaZ\t ")); + self::assertSame("\nFoo \n\n bAr \n baZ\n", self::$element->canonical("\nFoo \n\r bAr \r\n baZ\r")); + } +} diff --git a/tests/app/Elements/OccupationTest.php b/tests/app/Elements/OccupationTest.php new file mode 100644 index 0000000000..4f14cc2528 --- /dev/null +++ b/tests/app/Elements/OccupationTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class Occupation + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\Occupation + */ +class OccupationTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new Occupation('label'); + } +} diff --git a/tests/app/Elements/OrdinanceProcessFlagTest.php b/tests/app/Elements/OrdinanceProcessFlagTest.php new file mode 100644 index 0000000000..1f892906f8 --- /dev/null +++ b/tests/app/Elements/OrdinanceProcessFlagTest.php @@ -0,0 +1,50 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class OrdinanceProcessFlag + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\OrdinanceProcessFlag + */ +class OrdinanceProcessFlagTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new OrdinanceProcessFlag('label'); + } + + + /** + * @return void + */ + public function testCanonical(): void + { + self::assertSame('foo bar baz', self::$element->canonical("Foo bAr baZ")); + self::assertSame('foo bar baz', self::$element->canonical("\t Foo\t bAr \tbaZ\t ")); + self::assertSame('foo bar baz', self::$element->canonical("\nFoo \n\r bAr \r\n baZ\r")); + } +} diff --git a/tests/app/Elements/OrdinationTest.php b/tests/app/Elements/OrdinationTest.php new file mode 100644 index 0000000000..9f43cae2ac --- /dev/null +++ b/tests/app/Elements/OrdinationTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class Ordination + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\Ordination + */ +class OrdinationTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new Ordination('label'); + } +} diff --git a/tests/app/Elements/PafUidTest.php b/tests/app/Elements/PafUidTest.php new file mode 100644 index 0000000000..e1dfea944b --- /dev/null +++ b/tests/app/Elements/PafUidTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class PafUid + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\PafUid + */ +class PafUidTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new PafUid('label'); + } +} diff --git a/tests/app/Elements/PedigreeLinkageTypeTest.php b/tests/app/Elements/PedigreeLinkageTypeTest.php new file mode 100644 index 0000000000..71393421ac --- /dev/null +++ b/tests/app/Elements/PedigreeLinkageTypeTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class PedigreeLinkageType + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\PedigreeLinkageType + */ +class PedigreeLinkageTypeTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new PedigreeLinkageType('label'); + } +} diff --git a/tests/app/Elements/PermanentRecordFileNumberTest.php b/tests/app/Elements/PermanentRecordFileNumberTest.php new file mode 100644 index 0000000000..f012710678 --- /dev/null +++ b/tests/app/Elements/PermanentRecordFileNumberTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class PermanentRecordFileNumber + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\PermanentRecordFileNumber + */ +class PermanentRecordFileNumberTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new PermanentRecordFileNumber('label'); + } +} diff --git a/tests/app/Elements/PhoneNumberTest.php b/tests/app/Elements/PhoneNumberTest.php new file mode 100644 index 0000000000..3b38718966 --- /dev/null +++ b/tests/app/Elements/PhoneNumberTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class PhoneNumber + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\PhoneNumber + */ +class PhoneNumberTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new PhoneNumber('label'); + } +} diff --git a/tests/app/Elements/PhoneticTypeTest.php b/tests/app/Elements/PhoneticTypeTest.php new file mode 100644 index 0000000000..58d88102e3 --- /dev/null +++ b/tests/app/Elements/PhoneticTypeTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class PhoneticType + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\PhoneticType + */ +class PhoneticTypeTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new PhoneticType('label'); + } +} diff --git a/tests/app/Elements/PhysicalDescriptionTest.php b/tests/app/Elements/PhysicalDescriptionTest.php new file mode 100644 index 0000000000..bb6dc40cc6 --- /dev/null +++ b/tests/app/Elements/PhysicalDescriptionTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class PhysicalDescription + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\PhysicalDescription + */ +class PhysicalDescriptionTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new PhysicalDescription('label'); + } +} diff --git a/tests/app/Elements/PlaceHierarchyTest.php b/tests/app/Elements/PlaceHierarchyTest.php new file mode 100644 index 0000000000..177a2890c3 --- /dev/null +++ b/tests/app/Elements/PlaceHierarchyTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class PlaceHierarchy + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\PlaceHierarchy + */ +class PlaceHierarchyTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new PlaceHierarchy('label'); + } +} diff --git a/tests/app/Elements/PlaceLatitudeTest.php b/tests/app/Elements/PlaceLatitudeTest.php new file mode 100644 index 0000000000..f92f4f516e --- /dev/null +++ b/tests/app/Elements/PlaceLatitudeTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class PlaceLatitude + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\PlaceLatitude + */ +class PlaceLatitudeTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new PlaceLatitude('label'); + } +} diff --git a/tests/app/Elements/PlaceLivingOrdinanceTest.php b/tests/app/Elements/PlaceLivingOrdinanceTest.php new file mode 100644 index 0000000000..376af14096 --- /dev/null +++ b/tests/app/Elements/PlaceLivingOrdinanceTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class PlaceLivingOrdinance + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\PlaceLivingOrdinance + */ +class PlaceLivingOrdinanceTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new PlaceLivingOrdinance('label'); + } +} diff --git a/tests/app/Elements/PlaceLongtitudeTest.php b/tests/app/Elements/PlaceLongtitudeTest.php new file mode 100644 index 0000000000..6b51c8e3f8 --- /dev/null +++ b/tests/app/Elements/PlaceLongtitudeTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class PlaceLongtitude + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\PlaceLongtitude + */ +class PlaceLongtitudeTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new PlaceLongtitude('label'); + } +} diff --git a/tests/app/Elements/PlaceNameTest.php b/tests/app/Elements/PlaceNameTest.php new file mode 100644 index 0000000000..cdd43156eb --- /dev/null +++ b/tests/app/Elements/PlaceNameTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class PlaceName + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\PlaceName + */ +class PlaceNameTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new PlaceName('label'); + } +} diff --git a/tests/app/Elements/PlacePhoneticVariationTest.php b/tests/app/Elements/PlacePhoneticVariationTest.php new file mode 100644 index 0000000000..8f7cb8efa8 --- /dev/null +++ b/tests/app/Elements/PlacePhoneticVariationTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class PlacePhoneticVariation + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\PlacePhoneticVariation + */ +class PlacePhoneticVariationTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new PlacePhoneticVariation('label'); + } +} diff --git a/tests/app/Elements/PlaceRomanizedVariationTest.php b/tests/app/Elements/PlaceRomanizedVariationTest.php new file mode 100644 index 0000000000..12365be143 --- /dev/null +++ b/tests/app/Elements/PlaceRomanizedVariationTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class PlaceRomanizedVariation + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\PlaceRomanizedVariation + */ +class PlaceRomanizedVariationTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new PlaceRomanizedVariation('label'); + } +} diff --git a/tests/app/Elements/PossessionsTest.php b/tests/app/Elements/PossessionsTest.php new file mode 100644 index 0000000000..407f273419 --- /dev/null +++ b/tests/app/Elements/PossessionsTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class Possessions + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\Possessions + */ +class PossessionsTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new Possessions('label'); + } +} diff --git a/tests/app/Elements/ProbateTest.php b/tests/app/Elements/ProbateTest.php new file mode 100644 index 0000000000..3c029d574e --- /dev/null +++ b/tests/app/Elements/ProbateTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class Probate + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\Probate + */ +class ProbateTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new Probate('label'); + } +} diff --git a/tests/app/Elements/PublicationDateTest.php b/tests/app/Elements/PublicationDateTest.php new file mode 100644 index 0000000000..53e8d936ae --- /dev/null +++ b/tests/app/Elements/PublicationDateTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class PublicationDate + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\PublicationDate + */ +class PublicationDateTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new PublicationDate('label'); + } +} diff --git a/tests/app/Elements/ReceivingSystemNameTest.php b/tests/app/Elements/ReceivingSystemNameTest.php new file mode 100644 index 0000000000..08d4e5d117 --- /dev/null +++ b/tests/app/Elements/ReceivingSystemNameTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class ReceivingSystemName + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\ReceivingSystemName + */ +class ReceivingSystemNameTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new ReceivingSystemName('label'); + } +} diff --git a/tests/app/Elements/RelationIsDescriptorTest.php b/tests/app/Elements/RelationIsDescriptorTest.php new file mode 100644 index 0000000000..a6a3a2c0e9 --- /dev/null +++ b/tests/app/Elements/RelationIsDescriptorTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class RelationIsDescriptor + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\RelationIsDescriptor + */ +class RelationIsDescriptorTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new RelationIsDescriptor('label'); + } +} diff --git a/tests/app/Elements/ReligiousAffiliationTest.php b/tests/app/Elements/ReligiousAffiliationTest.php new file mode 100644 index 0000000000..5a3658206b --- /dev/null +++ b/tests/app/Elements/ReligiousAffiliationTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class ReligiousAffiliation + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\ReligiousAffiliation + */ +class ReligiousAffiliationTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new ReligiousAffiliation('label'); + } +} diff --git a/tests/app/Elements/RepositoryRecordTest.php b/tests/app/Elements/RepositoryRecordTest.php new file mode 100644 index 0000000000..64dd64c9b6 --- /dev/null +++ b/tests/app/Elements/RepositoryRecordTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class RepositoryRecord + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\RepositoryRecord + */ +class RepositoryRecordTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new RepositoryRecord('label'); + } +} diff --git a/tests/app/Elements/ResearchTaskPriorityTest.php b/tests/app/Elements/ResearchTaskPriorityTest.php new file mode 100644 index 0000000000..d7da9bd751 --- /dev/null +++ b/tests/app/Elements/ResearchTaskPriorityTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class ResearchTaskPriority + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\ResearchTaskPriority + */ +class ResearchTaskPriorityTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new ResearchTaskPriority('label'); + } +} diff --git a/tests/app/Elements/ResearchTaskStatusTest.php b/tests/app/Elements/ResearchTaskStatusTest.php new file mode 100644 index 0000000000..c19555b204 --- /dev/null +++ b/tests/app/Elements/ResearchTaskStatusTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class ResearchTaskStatus + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\ResearchTaskStatus + */ +class ResearchTaskStatusTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new ResearchTaskStatus('label'); + } +} diff --git a/tests/app/Elements/ResearchTaskTest.php b/tests/app/Elements/ResearchTaskTest.php new file mode 100644 index 0000000000..11bbaa720b --- /dev/null +++ b/tests/app/Elements/ResearchTaskTest.php @@ -0,0 +1,49 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class ResearchTask + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\ResearchTask + */ +class ResearchTaskTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new ResearchTask('label'); + } + + /** + * @return void + */ + public function testCanonical(): void + { + self::assertSame('Foo bAr baZ', self::$element->canonical("Foo bAr baZ")); + self::assertSame(' Foo bAr baZ ', self::$element->canonical("\t Foo\t bAr \tbaZ\t ")); + self::assertSame("\nFoo \n\n bAr \n baZ\n", self::$element->canonical("\nFoo \n\r bAr \r\n baZ\r")); + } +} diff --git a/tests/app/Elements/ResearchTaskTypeTest.php b/tests/app/Elements/ResearchTaskTypeTest.php new file mode 100644 index 0000000000..fac3ce12fc --- /dev/null +++ b/tests/app/Elements/ResearchTaskTypeTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class ResearchTaskType + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\ResearchTaskType + */ +class ResearchTaskTypeTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new ResearchTaskType('label'); + } +} diff --git a/tests/app/Elements/ResidenceTest.php b/tests/app/Elements/ResidenceTest.php new file mode 100644 index 0000000000..225db722bd --- /dev/null +++ b/tests/app/Elements/ResidenceTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class Residence + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\Residence + */ +class ResidenceTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new Residence('label'); + } +} diff --git a/tests/app/Elements/ResponsibleAgencyTest.php b/tests/app/Elements/ResponsibleAgencyTest.php new file mode 100644 index 0000000000..f4d9560598 --- /dev/null +++ b/tests/app/Elements/ResponsibleAgencyTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class ResponsibleAgency + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\ResponsibleAgency + */ +class ResponsibleAgencyTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new ResponsibleAgency('label'); + } +} diff --git a/tests/app/Elements/RestrictionNoticeTest.php b/tests/app/Elements/RestrictionNoticeTest.php new file mode 100644 index 0000000000..4992fcad00 --- /dev/null +++ b/tests/app/Elements/RestrictionNoticeTest.php @@ -0,0 +1,49 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class RestrictionNotice + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\RestrictionNotice + */ +class RestrictionNoticeTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new RestrictionNotice('label'); + } + + /** + * @return void + */ + public function testCanonical(): void + { + self::assertSame('foo bar baz', self::$element->canonical("Foo bAr baZ")); + self::assertSame('foo bar baz', self::$element->canonical("\t Foo\t bAr \tbaZ\t ")); + self::assertSame('foo bar baz', self::$element->canonical("\nFoo \n\r bAr \r\n baZ\r")); + } +} diff --git a/tests/app/Elements/RetirementTest.php b/tests/app/Elements/RetirementTest.php new file mode 100644 index 0000000000..f354709266 --- /dev/null +++ b/tests/app/Elements/RetirementTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class Retirement + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\Retirement + */ +class RetirementTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new Retirement('label'); + } +} diff --git a/tests/app/Elements/RoleInEventTest.php b/tests/app/Elements/RoleInEventTest.php new file mode 100644 index 0000000000..d6c977676f --- /dev/null +++ b/tests/app/Elements/RoleInEventTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class RoleInEvent + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\RoleInEvent + */ +class RoleInEventTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new RoleInEvent('label'); + } +} diff --git a/tests/app/Elements/RomanizedTypeTest.php b/tests/app/Elements/RomanizedTypeTest.php new file mode 100644 index 0000000000..15aeb54fe1 --- /dev/null +++ b/tests/app/Elements/RomanizedTypeTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class RomanizedType + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\RomanizedType + */ +class RomanizedTypeTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new RomanizedType('label'); + } +} diff --git a/tests/app/Elements/ScholasticAchievementTest.php b/tests/app/Elements/ScholasticAchievementTest.php new file mode 100644 index 0000000000..5876a191ff --- /dev/null +++ b/tests/app/Elements/ScholasticAchievementTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class ScholasticAchievement + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\ScholasticAchievement + */ +class ScholasticAchievementTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new ScholasticAchievement('label'); + } +} diff --git a/tests/app/Elements/SexValueTest.php b/tests/app/Elements/SexValueTest.php new file mode 100644 index 0000000000..c066489a63 --- /dev/null +++ b/tests/app/Elements/SexValueTest.php @@ -0,0 +1,49 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class SexValue + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\SexValue + */ +class SexValueTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new SexValue('label'); + } + + /** + * @return void + */ + public function testCanonical(): void + { + self::assertSame('FOO BAR BAZ', self::$element->canonical("Foo bAr baZ")); + self::assertSame('FOO BAR BAZ', self::$element->canonical("\t Foo\t bAr \tbaZ\t ")); + self::assertSame('FOO BAR BAZ', self::$element->canonical("\nFoo \n\r bAr \r\n baZ\r")); + } +} diff --git a/tests/app/Elements/SexXValueTest.php b/tests/app/Elements/SexXValueTest.php new file mode 100644 index 0000000000..680ad1f79f --- /dev/null +++ b/tests/app/Elements/SexXValueTest.php @@ -0,0 +1,49 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class SexXValue + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\SexXValue + */ +class SexXValueTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new SexXValue('label'); + } + + /** + * @return void + */ + public function testCanonical(): void + { + self::assertSame('FOO BAR BAZ', self::$element->canonical("Foo bAr baZ")); + self::assertSame('FOO BAR BAZ', self::$element->canonical("\t Foo\t bAr \tbaZ\t ")); + self::assertSame('FOO BAR BAZ', self::$element->canonical("\nFoo \n\r bAr \r\n baZ\r")); + } +} diff --git a/tests/app/Elements/SocialSecurityNumberTest.php b/tests/app/Elements/SocialSecurityNumberTest.php new file mode 100644 index 0000000000..8de210e6ee --- /dev/null +++ b/tests/app/Elements/SocialSecurityNumberTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class SocialSecurityNumber + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\SocialSecurityNumber + */ +class SocialSecurityNumberTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new SocialSecurityNumber('label'); + } +} diff --git a/tests/app/Elements/SourceCallNumberTest.php b/tests/app/Elements/SourceCallNumberTest.php new file mode 100644 index 0000000000..62bd14d26c --- /dev/null +++ b/tests/app/Elements/SourceCallNumberTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class SourceCallNumber + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\SourceCallNumber + */ +class SourceCallNumberTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new SourceCallNumber('label'); + } +} diff --git a/tests/app/Elements/SourceDataTest.php b/tests/app/Elements/SourceDataTest.php new file mode 100644 index 0000000000..72be5af641 --- /dev/null +++ b/tests/app/Elements/SourceDataTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class SourceData + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\SourceData + */ +class SourceDataTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new SourceData('label'); + } +} diff --git a/tests/app/Elements/SourceDescriptiveTitleTest.php b/tests/app/Elements/SourceDescriptiveTitleTest.php new file mode 100644 index 0000000000..b5841b915b --- /dev/null +++ b/tests/app/Elements/SourceDescriptiveTitleTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class SourceDescriptiveTitle + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\SourceDescriptiveTitle + */ +class SourceDescriptiveTitleTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new SourceDescriptiveTitle('label'); + } +} diff --git a/tests/app/Elements/SourceFiledByEntryTest.php b/tests/app/Elements/SourceFiledByEntryTest.php new file mode 100644 index 0000000000..b9d48cc5b9 --- /dev/null +++ b/tests/app/Elements/SourceFiledByEntryTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class SourceFiledByEntry + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\SourceFiledByEntry + */ +class SourceFiledByEntryTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new SourceFiledByEntry('label'); + } +} diff --git a/tests/app/Elements/SourceJurisdictionPlaceTest.php b/tests/app/Elements/SourceJurisdictionPlaceTest.php new file mode 100644 index 0000000000..d1cffb26c3 --- /dev/null +++ b/tests/app/Elements/SourceJurisdictionPlaceTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class SourceJurisdictionPlace + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\SourceJurisdictionPlace + */ +class SourceJurisdictionPlaceTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new SourceJurisdictionPlace('label'); + } +} diff --git a/tests/app/Elements/SourceMediaTypeTest.php b/tests/app/Elements/SourceMediaTypeTest.php new file mode 100644 index 0000000000..4a2a6e8217 --- /dev/null +++ b/tests/app/Elements/SourceMediaTypeTest.php @@ -0,0 +1,49 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class SourceMediaType + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\SourceMediaType + */ +class SourceMediaTypeTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new SourceMediaType('label'); + } + + /** + * @return void + */ + public function testCanonical(): void + { + self::assertSame('foo bar baz', self::$element->canonical("Foo bAr baZ")); + self::assertSame('foo bar baz', self::$element->canonical("\t Foo\t bAr \tbaZ\t ")); + self::assertSame('foo bar baz', self::$element->canonical("\nFoo \n\r bAr \r\n baZ\r")); + } +} diff --git a/tests/app/Elements/SourceOriginatorTest.php b/tests/app/Elements/SourceOriginatorTest.php new file mode 100644 index 0000000000..1ddac2ca65 --- /dev/null +++ b/tests/app/Elements/SourceOriginatorTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class SourceOriginator + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\SourceOriginator + */ +class SourceOriginatorTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new SourceOriginator('label'); + } +} diff --git a/tests/app/Elements/SourcePublicationFactsTest.php b/tests/app/Elements/SourcePublicationFactsTest.php new file mode 100644 index 0000000000..27665e06a4 --- /dev/null +++ b/tests/app/Elements/SourcePublicationFactsTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class SourcePublicationFacts + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\SourcePublicationFacts + */ +class SourcePublicationFactsTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new SourcePublicationFacts('label'); + } +} diff --git a/tests/app/Elements/SourceRecordTest.php b/tests/app/Elements/SourceRecordTest.php new file mode 100644 index 0000000000..3c9f7b2f80 --- /dev/null +++ b/tests/app/Elements/SourceRecordTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class SourceRecord + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\SourceRecord + */ +class SourceRecordTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new SourceRecord('label'); + } +} diff --git a/tests/app/Elements/SubmissionRecordTest.php b/tests/app/Elements/SubmissionRecordTest.php new file mode 100644 index 0000000000..0dd4b2ecf3 --- /dev/null +++ b/tests/app/Elements/SubmissionRecordTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class SubmissionRecord + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\SubmissionRecord + */ +class SubmissionRecordTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new SubmissionRecord('label'); + } +} diff --git a/tests/app/Elements/SubmitterNameTest.php b/tests/app/Elements/SubmitterNameTest.php new file mode 100644 index 0000000000..2ea3e4484d --- /dev/null +++ b/tests/app/Elements/SubmitterNameTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class SubmitterName + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\SubmitterName + */ +class SubmitterNameTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new SubmitterName('label'); + } +} diff --git a/tests/app/Elements/SubmitterRecordTest.php b/tests/app/Elements/SubmitterRecordTest.php new file mode 100644 index 0000000000..bc79ff3740 --- /dev/null +++ b/tests/app/Elements/SubmitterRecordTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class SubmitterRecord + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\SubmitterRecord + */ +class SubmitterRecordTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new SubmitterRecord('label'); + } +} diff --git a/tests/app/Elements/SubmitterRegisteredRfnTest.php b/tests/app/Elements/SubmitterRegisteredRfnTest.php new file mode 100644 index 0000000000..54670c4939 --- /dev/null +++ b/tests/app/Elements/SubmitterRegisteredRfnTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class SubmitterRegisteredRfn + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\SubmitterRegisteredRfn + */ +class SubmitterRegisteredRfnTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new SubmitterRegisteredRfn('label'); + } +} diff --git a/tests/app/Elements/SubmitterTextTest.php b/tests/app/Elements/SubmitterTextTest.php new file mode 100644 index 0000000000..9202ae8412 --- /dev/null +++ b/tests/app/Elements/SubmitterTextTest.php @@ -0,0 +1,49 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class SubmitterText + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\SubmitterText + */ +class SubmitterTextTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new SubmitterText('label'); + } + + /** + * @return void + */ + public function testCanonical(): void + { + self::assertSame('Foo bAr baZ', self::$element->canonical("Foo bAr baZ")); + self::assertSame(' Foo bAr baZ ', self::$element->canonical("\t Foo\t bAr \tbaZ\t ")); + self::assertSame("\nFoo \n\n bAr \n baZ\n", self::$element->canonical("\nFoo \n\r bAr \r\n baZ\r")); + } +} diff --git a/tests/app/Elements/TempleCodeTest.php b/tests/app/Elements/TempleCodeTest.php new file mode 100644 index 0000000000..f2d6ee620e --- /dev/null +++ b/tests/app/Elements/TempleCodeTest.php @@ -0,0 +1,49 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class TempleCode + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\TempleCode + */ +class TempleCodeTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new TempleCode('label'); + } + + /** + * @return void + */ + public function testCanonical(): void + { + self::assertSame('FOO BAR BAZ', self::$element->canonical("Foo bAr baZ")); + self::assertSame('FOO BAR BAZ', self::$element->canonical("\t Foo\t bAr \tbaZ\t ")); + self::assertSame('FOO BAR BAZ', self::$element->canonical("\nFoo \n\r bAr \r\n baZ\r")); + } +} diff --git a/tests/app/Elements/TextFromSourceTest.php b/tests/app/Elements/TextFromSourceTest.php new file mode 100644 index 0000000000..dbfe7fab05 --- /dev/null +++ b/tests/app/Elements/TextFromSourceTest.php @@ -0,0 +1,49 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class TextFromSource + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\TextFromSource + */ +class TextFromSourceTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new TextFromSource('label'); + } + + /** + * @return void + */ + public function testCanonical(): void + { + self::assertSame('Foo bAr baZ', self::$element->canonical("Foo bAr baZ")); + self::assertSame(' Foo bAr baZ ', self::$element->canonical("\t Foo\t bAr \tbaZ\t ")); + self::assertSame("\nFoo \n\n bAr \n baZ\n", self::$element->canonical("\nFoo \n\r bAr \r\n baZ\r")); + } +} diff --git a/tests/app/Elements/TimeValueTest.php b/tests/app/Elements/TimeValueTest.php new file mode 100644 index 0000000000..e713705aff --- /dev/null +++ b/tests/app/Elements/TimeValueTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class TimeValue + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\TimeValue + */ +class TimeValueTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new TimeValue('label'); + } +} diff --git a/tests/app/Elements/TransmissionDateTest.php b/tests/app/Elements/TransmissionDateTest.php new file mode 100644 index 0000000000..489971f14a --- /dev/null +++ b/tests/app/Elements/TransmissionDateTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class TransmissionDate + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\TransmissionDate + */ +class TransmissionDateTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new TransmissionDate('label'); + } +} diff --git a/tests/app/Elements/UnknownElementTest.php b/tests/app/Elements/UnknownElementTest.php new file mode 100644 index 0000000000..37538b0c8a --- /dev/null +++ b/tests/app/Elements/UnknownElementTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class UnknownElement + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\UnknownElement + */ +class UnknownElementTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new UnknownElement('label'); + } +} diff --git a/tests/app/Elements/UserReferenceNumberTest.php b/tests/app/Elements/UserReferenceNumberTest.php new file mode 100644 index 0000000000..fd2fa7db1b --- /dev/null +++ b/tests/app/Elements/UserReferenceNumberTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class UserReferenceNumber + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\UserReferenceNumber + */ +class UserReferenceNumberTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new UserReferenceNumber('label'); + } +} diff --git a/tests/app/Elements/UserReferenceTypeTest.php b/tests/app/Elements/UserReferenceTypeTest.php new file mode 100644 index 0000000000..ed141e1998 --- /dev/null +++ b/tests/app/Elements/UserReferenceTypeTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class UserReferenceType + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\UserReferenceType + */ +class UserReferenceTypeTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new UserReferenceType('label'); + } +} diff --git a/tests/app/Elements/VersionNumberTest.php b/tests/app/Elements/VersionNumberTest.php new file mode 100644 index 0000000000..a12889d904 --- /dev/null +++ b/tests/app/Elements/VersionNumberTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class VersionNumber + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\VersionNumber + */ +class VersionNumberTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new VersionNumber('label'); + } +} diff --git a/tests/app/Elements/WebtreesUserTest.php b/tests/app/Elements/WebtreesUserTest.php new file mode 100644 index 0000000000..52c52baccb --- /dev/null +++ b/tests/app/Elements/WebtreesUserTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class WebtreesUser + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\WebtreesUser + */ +class WebtreesUserTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new WebtreesUser('label'); + } +} diff --git a/tests/app/Elements/WhereWithinSourceTest.php b/tests/app/Elements/WhereWithinSourceTest.php new file mode 100644 index 0000000000..5337ffadb6 --- /dev/null +++ b/tests/app/Elements/WhereWithinSourceTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class WhereWithinSource + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\WhereWithinSource + */ +class WhereWithinSourceTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new WhereWithinSource('label'); + } +} diff --git a/tests/app/Elements/WillTest.php b/tests/app/Elements/WillTest.php new file mode 100644 index 0000000000..3e85bab9dc --- /dev/null +++ b/tests/app/Elements/WillTest.php @@ -0,0 +1,39 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2021 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +declare(strict_types=1); + +namespace Fisharebest\Webtrees\Elements; + +/** + * Test harness for the class Will + * + * @covers \Fisharebest\Webtrees\Elements\AbstractElement + * @covers \Fisharebest\Webtrees\Elements\Will + */ +class WillTest extends AbstractElementTest +{ + /** + * Standard tests for all elements. + */ + public static function setupBeforeClass(): void + { + parent::setUpBeforeClass(); + + self::$element = new Will('label'); + } +} |
