summaryrefslogtreecommitdiff
path: root/tests/includes/functions
diff options
context:
space:
mode:
Diffstat (limited to 'tests/includes/functions')
-rw-r--r--tests/includes/functions/FunctionsChartsTest.php76
-rw-r--r--tests/includes/functions/FunctionsDateTest.php48
-rw-r--r--tests/includes/functions/FunctionsDbTest.php188
-rw-r--r--tests/includes/functions/FunctionsEditTest.php280
-rw-r--r--tests/includes/functions/FunctionsExportTest.php55
-rw-r--r--tests/includes/functions/FunctionsImportTest.php90
-rw-r--r--tests/includes/functions/FunctionsMediaDbTest.php51
-rw-r--r--tests/includes/functions/FunctionsPrintFactsTest.php90
-rw-r--r--tests/includes/functions/FunctionsPrintListsTest.php132
-rw-r--r--tests/includes/functions/FunctionsPrintTest.php196
-rw-r--r--tests/includes/functions/FunctionsRtlTest.php83
-rw-r--r--tests/includes/functions/FunctionsTest.php152
12 files changed, 0 insertions, 1441 deletions
diff --git a/tests/includes/functions/FunctionsChartsTest.php b/tests/includes/functions/FunctionsChartsTest.php
deleted file mode 100644
index 705206654d..0000000000
--- a/tests/includes/functions/FunctionsChartsTest.php
+++ /dev/null
@@ -1,76 +0,0 @@
-<?php
-
-/**
- * webtrees: online genealogy
- * Copyright (C) 2015 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 <http://www.gnu.org/licenses/>.
- */
-
-/**
- * Unit tests for the global functions in the file includes/functions/functions_charts.php
- */
-class FunctionsChartsTest extends PHPUnit_Framework_TestCase {
- /**
- * Prepare the environment for these tests
- */
- public function setUp() {
- }
-
- /**
- * Test that function print_sosa_number() exists in the correct namespace.
- */
- public function testFunctionPrintSosaNumberExists() {
- $this->assertEquals(function_exists('print_sosa_number'), true);
- }
-
- /**
- * Test that function print_family_children() exists in the correct namespace.
- */
- public function testFunctionPrintFamilyParentsExists() {
- $this->assertEquals(function_exists('print_family_children'), true);
- }
-
- /**
- * Test that function print_family_children() exists in the correct namespace.
- */
- public function testFunctionPrintFamilyChildrenExists() {
- $this->assertEquals(function_exists('print_family_children'), true);
- }
-
- /**
- * Test that function print_sosa_family() exists in the correct namespace.
- */
- public function testFunctionPrintSosaFamilyExists() {
- $this->assertEquals(function_exists('print_sosa_family'), true);
- }
-
- /**
- * Test that function print_url_arrow() exists in the correct namespace.
- */
- public function testFunctionPrintUrlArrowExists() {
- $this->assertEquals(function_exists('print_url_arrow'), true);
- }
-
- /**
- * Test that function get_sosa_name() exists in the correct namespace.
- */
- public function testFunctionGetSosaNameExists() {
- $this->assertEquals(function_exists('get_sosa_name'), true);
- }
-
- /**
- * Test that function print_cousins() exists in the correct namespace.
- */
- public function testFunctionPrintCousinsExists() {
- $this->assertEquals(function_exists('print_cousins'), true);
- }
-}
diff --git a/tests/includes/functions/FunctionsDateTest.php b/tests/includes/functions/FunctionsDateTest.php
deleted file mode 100644
index 5ce76a452f..0000000000
--- a/tests/includes/functions/FunctionsDateTest.php
+++ /dev/null
@@ -1,48 +0,0 @@
-<?php
-
-/**
- * webtrees: online genealogy
- * Copyright (C) 2015 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 <http://www.gnu.org/licenses/>.
- */
-
-/**
- * Unit tests for the global functions in the file includes/functions/functions_date.php
- */
-class FunctionsDateTest extends PHPUnit_Framework_TestCase {
- /**
- * Prepare the environment for these tests
- */
- public function setUp() {
- }
-
- /**
- * Test that function get_age_at_event() exists in the correct namespace.
- */
- public function testFunctionGetAgeAtEventExists() {
- $this->assertEquals(function_exists('get_age_at_event'), true);
- }
-
- /**
- * Test that function format_timestamp() exists in the correct namespace.
- */
- public function testFunctionFormatTimestampExists() {
- $this->assertEquals(function_exists('format_timestamp'), true);
- }
-
- /**
- * Test that function timestamp_to_gedcom_date() exists in the correct namespace.
- */
- public function testFunctionTimestampToGedcomDateExists() {
- $this->assertEquals(function_exists('timestamp_to_gedcom_date'), true);
- }
-}
diff --git a/tests/includes/functions/FunctionsDbTest.php b/tests/includes/functions/FunctionsDbTest.php
deleted file mode 100644
index 2d04e69c52..0000000000
--- a/tests/includes/functions/FunctionsDbTest.php
+++ /dev/null
@@ -1,188 +0,0 @@
-<?php
-
-/**
- * webtrees: online genealogy
- * Copyright (C) 2015 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 <http://www.gnu.org/licenses/>.
- */
-
-/**
- * Unit tests for the global functions in the file includes/functions/functions_db.php
- */
-class FunctionsDbTest extends PHPUnit_Framework_TestCase {
- /**
- * Prepare the environment for these tests
- */
- public function setUp() {
- }
-
- /**
- * Test that function fetch_all_links() exists in the correct namespace.
- */
- public function testFunctionFetchAllLinksExists() {
- $this->assertEquals(function_exists('fetch_all_links'), true);
- }
-
- /**
- * Test that function get_source_list() exists in the correct namespace.
- */
- public function testFunctionGetSourceListExists() {
- $this->assertEquals(function_exists('get_source_list'), true);
- }
-
- /**
- * Test that function get_repo_list() exists in the correct namespace.
- */
- public function testFunctionGetRepoListExists() {
- $this->assertEquals(function_exists('get_repo_list'), true);
- }
-
- /**
- * Test that function get_note_list() exists in the correct namespace.
- */
- public function testFunctionGetNoteListExists() {
- $this->assertEquals(function_exists('get_note_list'), true);
- }
-
- /**
- * Test that function search_indis() exists in the correct namespace.
- */
- public function testFunctionSearchIndisExists() {
- $this->assertEquals(function_exists('search_indis'), true);
- }
-
- /**
- * Test that function search_indis_names() exists in the correct namespace.
- */
- public function testFunctionSearchIndisNamesExists() {
- $this->assertEquals(function_exists('search_indis_names'), true);
- }
-
- /**
- * Test that function search_indis_soundex() exists in the correct namespace.
- */
- public function testFunctionSearchIndisSoundexExists() {
- $this->assertEquals(function_exists('search_indis_soundex'), true);
- }
-
- /**
- * Test that function get_recent_changes() exists in the correct namespace.
- */
- public function testFunctionGetRecentChangesExists() {
- $this->assertEquals(function_exists('get_recent_changes'), true);
- }
-
- /**
- * Test that function search_fams() exists in the correct namespace.
- */
- public function testFunctionSearchFamsExists() {
- $this->assertEquals(function_exists('search_fams'), true);
- }
-
- /**
- * Test that function search_fams_names() exists in the correct namespace.
- */
- public function testFunctionSearchFamsNamesExists() {
- $this->assertEquals(function_exists('search_fams_names'), true);
- }
-
- /**
- * Test that function search_sources() exists in the correct namespace.
- */
- public function testFunctionSearchSourcesExists() {
- $this->assertEquals(function_exists('search_sources'), true);
- }
-
- /**
- * Test that function search_notes() exists in the correct namespace.
- */
- public function testFunctionSearchNotesExists() {
- $this->assertEquals(function_exists('search_notes'), true);
- }
-
- /**
- * Test that function search_repos() exists in the correct namespace.
- */
- public function testFunctionSearchReposExists() {
- $this->assertEquals(function_exists('search_repos'), true);
- }
-
- /**
- * Test that function find_rin_id() exists in the correct namespace.
- */
- public function testFunctionFindRinIdExists() {
- $this->assertEquals(function_exists('find_rin_id'), true);
- }
-
- /**
- * Test that function get_common_surnames() exists in the correct namespace.
- */
- public function testFunctionGetCommonSurnamesExists() {
- $this->assertEquals(function_exists('get_common_surnames'), true);
- }
-
- /**
- * Test that function get_top_surnames() exists in the correct namespace.
- */
- public function testFunctionGetTopSurnamesExists() {
- $this->assertEquals(function_exists('get_top_surnames'), true);
- }
-
- /**
- * Test that function get_anniversary_events() exists in the correct namespace.
- */
- public function testFunctionGetAnniversaryEventsExists() {
- $this->assertEquals(function_exists('get_anniversary_events'), true);
- }
-
- /**
- * Test that function get_calendar_events() exists in the correct namespace.
- */
- public function testFunctionGetCalendarEventsExists() {
- $this->assertEquals(function_exists('get_calendar_events'), true);
- }
-
- /**
- * Test that function is_media_used_in_other_gedcom() exists in the correct namespace.
- */
- public function testFunctionIsMediaUsedInOtherGedcomExists() {
- $this->assertEquals(function_exists('is_media_used_in_other_gedcom'), true);
- }
-
- /**
- * Test that function get_user_blocks() exists in the correct namespace.
- */
- public function testFunctionGetUserBlocksExists() {
- $this->assertEquals(function_exists('get_user_blocks'), true);
- }
-
- /**
- * Test that function get_gedcom_blocks() exists in the correct namespace.
- */
- public function testFunctionGetGedcomBlocksExists() {
- $this->assertEquals(function_exists('get_gedcom_blocks'), true);
- }
-
- /**
- * Test that function update_favorites() exists in the correct namespace.
- */
- public function testFunctionUpdateFavoritesExists() {
- $this->assertEquals(function_exists('update_favorites'), true);
- }
-
- /**
- * Test that function get_events_list() exists in the correct namespace.
- */
- public function testFunctionGetEventsListExists() {
- $this->assertEquals(function_exists('get_events_list'), true);
- }
-}
diff --git a/tests/includes/functions/FunctionsEditTest.php b/tests/includes/functions/FunctionsEditTest.php
deleted file mode 100644
index 73476f9b86..0000000000
--- a/tests/includes/functions/FunctionsEditTest.php
+++ /dev/null
@@ -1,280 +0,0 @@
-<?php
-
-/**
- * webtrees: online genealogy
- * Copyright (C) 2015 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 <http://www.gnu.org/licenses/>.
- */
-
-/**
- * Unit tests for the global functions in the file includes/functions/functions_edit.php
- */
-class FunctionsEditTest extends PHPUnit_Framework_TestCase {
- /**
- * Prepare the environment for these tests
- */
- public function setUp() {
- defined('WT_ROOT') || define('WT_ROOT', '');
- }
-
- /**
- * Test that function select_edit_control() exists in the correct namespace.
- */
- public function testFunctionSelectEditControlExists() {
- $this->assertEquals(function_exists('select_edit_control'), true);
- }
-
- /**
- * Test that function radio_buttons() exists in the correct namespace.
- */
- public function testFunctionRadioButtonsExists() {
- $this->assertEquals(function_exists('radio_buttons'), true);
- }
-
- /**
- * Test that function edit_field_yes_no() exists in the correct namespace.
- */
- public function testFunctionEditFieldYesNoExists() {
- $this->assertEquals(function_exists('edit_field_yes_no'), true);
- }
-
- /**
- * Test that function checkbox() exists in the correct namespace.
- */
- public function testFunctionCheckboxExists() {
- $this->assertEquals(function_exists('checkbox'), true);
- }
-
- /**
- * Test that function two_state_checkbox() exists in the correct namespace.
- */
- public function testFunctionTwoStateCheckboxExists() {
- $this->assertEquals(function_exists('two_state_checkbox'), true);
- }
-
- /**
- * Test that function edit_language_checkboxes() exists in the correct namespace.
- */
- public function testFunctionEditLanguageCheckboxesExists() {
- $this->assertEquals(function_exists('edit_language_checkboxes'), true);
- }
-
- /**
- * Test that function edit_field_access_level() exists in the correct namespace.
- */
- public function testFunctionEditFieldAccessLevelExists() {
- $this->assertEquals(function_exists('edit_field_access_level'), true);
- }
-
- /**
- * Test that function edit_field_resn() exists in the correct namespace.
- */
- public function testFunctionEditFieldResnExists() {
- $this->assertEquals(function_exists('edit_field_resn'), true);
- }
-
- /**
- * Test that function edit_field_contact() exists in the correct namespace.
- */
- public function testFunctionEditFieldContactExists() {
- $this->assertEquals(function_exists('edit_field_contact'), true);
- }
-
- /**
- * Test that function edit_field_language() exists in the correct namespace.
- */
- public function testFunctionEditFieldLangaugeExists() {
- $this->assertEquals(function_exists('edit_field_language'), true);
- }
-
- /**
- * Test that function edit_field_integers() exists in the correct namespace.
- */
- public function testFunctionEditFieldIntegersExists() {
- $this->assertEquals(function_exists('edit_field_integers'), true);
- }
-
- /**
- * Test that function edit_field_username() exists in the correct namespace.
- */
- public function testFunctionEditFieldUsernameExists() {
- $this->assertEquals(function_exists('edit_field_username'), true);
- }
-
- /**
- * Test that function edit_field_adop() exists in the correct namespace.
- */
- public function testFunctionEditFieldAdopExists() {
- $this->assertEquals(function_exists('edit_field_adop'), true);
- }
-
- /**
- * Test that function edit_field_pedi() exists in the correct namespace.
- */
- public function testFunctionEditFieldPediExists() {
- $this->assertEquals(function_exists('edit_field_pedi'), true);
- }
-
- /**
- * Test that function edit_field_name_type() exists in the correct namespace.
- */
- public function testFunctionEditFieldNameTypeExists() {
- $this->assertEquals(function_exists('edit_field_name_type'), true);
- }
-
- /**
- * Test that function edit_field_rela() exists in the correct namespace.
- */
- public function testFunctionEditFieldRelaExists() {
- $this->assertEquals(function_exists('edit_field_rela'), true);
- }
-
- /**
- * Test that function remove_links() exists in the correct namespace.
- */
- public function testFunctionRemoveLinksExists() {
- $this->assertEquals(function_exists('remove_links'), true);
- }
-
- /**
- * Test that function print_calendar_popup() exists in the correct namespace.
- */
- public function testFunctionPrintCalendarPopupExists() {
- $this->assertEquals(function_exists('print_calendar_popup'), true);
- }
-
- /**
- * Test that function print_addnewmedia_link() exists in the correct namespace.
- */
- public function testFunctionPrintAddnewmediaLinkExists() {
- $this->assertEquals(function_exists('print_addnewmedia_link'), true);
- }
-
- /**
- * Test that function print_addnewrepository_link() exists in the correct namespace.
- */
- public function testFunctionPrintAddnewrepositoryLinkExists() {
- $this->assertEquals(function_exists('print_addnewrepository_link'), true);
- }
-
- /**
- * Test that function print_addnewnote_link() exists in the correct namespace.
- */
- public function testFunctionPrintAddnewnoteLinkExists() {
- $this->assertEquals(function_exists('print_addnewnote_link'), true);
- }
-
- /**
- * Test that function print_editnote_link() exists in the correct namespace.
- */
- public function testFunctionPrintEditnoteLinkExists() {
- $this->assertEquals(function_exists('print_editnote_link'), true);
- }
-
- /**
- * Test that function print_addnewsource_link() exists in the correct namespace.
- */
- public function testFunctionPrintAddnewsourceLinkExists() {
- $this->assertEquals(function_exists('print_addnewsource_link'), true);
- }
-
- /**
- * Test that function add_simple_tag() exists in the correct namespace.
- */
- public function testFunctionAddSimpleTagExists() {
- $this->assertEquals(function_exists('add_simple_tag'), true);
- }
-
- /**
- * Test that function print_add_layer() exists in the correct namespace.
- */
- public function testFunctionPrintAddLayerExists() {
- $this->assertEquals(function_exists('print_add_layer'), true);
- }
-
- /**
- * Test that function addSimpleTags() exists in the correct namespace.
- */
- public function testFunctionAddSimpleTagsExists() {
- $this->assertEquals(function_exists('addSimpleTags'), true);
- }
-
- /**
- * Test that function addNewName() exists in the correct namespace.
- */
- public function testFunctionAddNewNameExists() {
- $this->assertEquals(function_exists('addNewName'), true);
- }
-
- /**
- * Test that function addNewSex() exists in the correct namespace.
- */
- public function testFunctionAddNewSexExists() {
- $this->assertEquals(function_exists('addNewSex'), true);
- }
-
- /**
- * Test that function addNewFact() exists in the correct namespace.
- */
- public function testFunctionAddNewFactExists() {
- $this->assertEquals(function_exists('addNewFact'), true);
- }
-
- /**
- * Test that function splitSOUR() exists in the correct namespace.
- */
- public function testFunctionSplitSourExists() {
- $this->assertEquals(function_exists('splitSOUR'), true);
- }
-
- /**
- * Test that function updateSOUR() exists in the correct namespace.
- */
- public function testFunctionUpdateSourExists() {
- $this->assertEquals(function_exists('updateSOUR'), true);
- }
-
- /**
- * Test that function updateRest() exists in the correct namespace.
- */
- public function testFunctionUpdateRestExists() {
- $this->assertEquals(function_exists('updateRest'), true);
- }
-
- /**
- * Test that function handle_updates() exists in the correct namespace.
- */
- public function testFunctionHandleUpdatesExists() {
- $this->assertEquals(function_exists('handle_updates'), true);
- }
-
- /**
- * Test that function create_add_form() exists in the correct namespace.
- */
- public function testFunctionCreateAddFromExists() {
- $this->assertEquals(function_exists('create_add_form'), true);
- }
-
- /**
- * Test that function create_edit_form() exists in the correct namespace.
- */
- public function testFunctionCreateEditFromExists() {
- $this->assertEquals(function_exists('create_edit_form'), true);
- }
-
- /**
- * Test that function insert_missing_subtags() exists in the correct namespace.
- */
- public function testFunctionInsertMissingSubtagsExists() {
- $this->assertEquals(function_exists('insert_missing_subtags'), true);
- }
-}
diff --git a/tests/includes/functions/FunctionsExportTest.php b/tests/includes/functions/FunctionsExportTest.php
deleted file mode 100644
index 7e802c97b2..0000000000
--- a/tests/includes/functions/FunctionsExportTest.php
+++ /dev/null
@@ -1,55 +0,0 @@
-<?php
-
-/**
- * webtrees: online genealogy
- * Copyright (C) 2015 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 <http://www.gnu.org/licenses/>.
- */
-
-/**
- * Unit tests for the global functions in the file includes/functions/functions_export.php
- */
-class FunctionsExportTest extends PHPUnit_Framework_TestCase {
- /**
- * Prepare the environment for these tests
- */
- public function setUp() {
- }
-
- /**
- * Test that function reformat_record_export() exists in the correct namespace.
- */
- public function testFunctionReformatRecordExportExists() {
- $this->assertEquals(function_exists('reformat_record_export'), true);
- }
-
- /**
- * Test that function gedcom_header() exists in the correct namespace.
- */
- public function testFunctionGedcomHeaderExists() {
- $this->assertEquals(function_exists('gedcom_header'), true);
- }
-
- /**
- * Test that function convert_media_path() exists in the correct namespace.
- */
- public function testFunctionConvertMediaPathExists() {
- $this->assertEquals(function_exists('convert_media_path'), true);
- }
-
- /**
- * Test that function export_gedcom() exists in the correct namespace.
- */
- public function testFunctionExportGedcomExists() {
- $this->assertEquals(function_exists('export_gedcom'), true);
- }
-}
diff --git a/tests/includes/functions/FunctionsImportTest.php b/tests/includes/functions/FunctionsImportTest.php
deleted file mode 100644
index da6a5c03a0..0000000000
--- a/tests/includes/functions/FunctionsImportTest.php
+++ /dev/null
@@ -1,90 +0,0 @@
-<?php
-
-/**
- * webtrees: online genealogy
- * Copyright (C) 2015 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 <http://www.gnu.org/licenses/>.
- */
-
-/**
- * Unit tests for the global functions in the file includes/functions/functions_import.php
- */
-class FunctionsImportTest extends PHPUnit_Framework_TestCase {
- /**
- * Prepare the environment for these tests
- */
- public function setUp() {
- }
-
- /**
- * Test that function reformat_record_import() exists in the correct namespace.
- */
- public function testFunctionReformatRecordImportExists() {
- $this->assertEquals(function_exists('reformat_record_import'), true);
- }
-
- /**
- * Test that function update_dates() exists in the correct namespace.
- */
- public function testFunctionUpdateDatesExists() {
- $this->assertEquals(function_exists('update_dates'), true);
- }
-
- /**
- * Test that function update_links() exists in the correct namespace.
- */
- public function testFunctionUpdateLinksExists() {
- $this->assertEquals(function_exists('update_links'), true);
- }
-
- /**
- * Test that function update_names() exists in the correct namespace.
- */
- public function testFunctionUpdateNamesExists() {
- $this->assertEquals(function_exists('update_names'), true);
- }
-
- /**
- * Test that function convert_inline_media() exists in the correct namespace.
- */
- public function testFunctionConvertInlineMediaExists() {
- $this->assertEquals(function_exists('convert_inline_media'), true);
- }
-
- /**
- * Test that function create_media_object() exists in the correct namespace.
- */
- public function testFunctionCreateMediaObjectExists() {
- $this->assertEquals(function_exists('create_media_object'), true);
- }
-
- /**
- * Test that function accept_all_changes() exists in the correct namespace.
- */
- public function testFunctionAcceptAllChangesExists() {
- $this->assertEquals(function_exists('accept_all_changes'), true);
- }
-
- /**
- * Test that function reject_all_changes() exists in the correct namespace.
- */
- public function testFunctionRejectAllChangesExists() {
- $this->assertEquals(function_exists('reject_all_changes'), true);
- }
-
- /**
- * Test that function update_record() exists in the correct namespace.
- */
- public function testFunctionUpdateRecordExists() {
- $this->assertEquals(function_exists('update_record'), true);
- }
-}
diff --git a/tests/includes/functions/FunctionsMediaDbTest.php b/tests/includes/functions/FunctionsMediaDbTest.php
deleted file mode 100644
index fb4956e5e8..0000000000
--- a/tests/includes/functions/FunctionsMediaDbTest.php
+++ /dev/null
@@ -1,51 +0,0 @@
-<?php
-
-/**
- * webtrees: online genealogy
- * Copyright (C) 2015 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 <http://www.gnu.org/licenses/>.
- */
-
-/**
- * Unit tests for the global functions in the file includes/functions/functions_mediadb.php
- */
-class FunctionsMediaDbTest extends PHPUnit_Framework_TestCase {
- /**
- * Prepare the environment for these tests
- */
- public function setUp() {
- }
-
- /**
- * Test the function return_bytes().
- */
- public function testFunctionReturnBytes() {
- $this->assertSame(-1, return_bytes(''));
- $this->assertSame(-1, return_bytes('-1'));
- $this->assertSame(42, return_bytes('42'));
- $this->assertSame(42, return_bytes('42b'));
- $this->assertSame(42, return_bytes('42B'));
- $this->assertSame(43008, return_bytes('42k'));
- $this->assertSame(43008, return_bytes('42K'));
- $this->assertSame(44040192, return_bytes('42m'));
- $this->assertSame(44040192, return_bytes('42M'));
- $this->assertSame(45097156608, return_bytes('42g'));
- $this->assertSame(45097156608, return_bytes('42G'));
- }
-
- /**
- * Test that function hasMemoryForImage() exists in the correct namespace.
- */
- public function testFunctionHasMemoryForImageExists() {
- $this->assertEquals(function_exists('hasMemoryForImage'), true);
- }
-}
diff --git a/tests/includes/functions/FunctionsPrintFactsTest.php b/tests/includes/functions/FunctionsPrintFactsTest.php
deleted file mode 100644
index a60cb5441f..0000000000
--- a/tests/includes/functions/FunctionsPrintFactsTest.php
+++ /dev/null
@@ -1,90 +0,0 @@
-<?php
-
-/**
- * webtrees: online genealogy
- * Copyright (C) 2015 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 <http://www.gnu.org/licenses/>.
- */
-
-/**
- * Unit tests for the global functions in the file includes/functions/functions_print_facts.php
- */
-class FunctionsPrintFactsTest extends PHPUnit_Framework_TestCase {
- /**
- * Prepare the environment for these tests
- */
- public function setUp() {
- }
-
- /**
- * Test that function print_fact() exists in the correct namespace.
- */
- public function testFunctionPrintFactExists() {
- $this->assertEquals(function_exists('print_fact'), true);
- }
-
- /**
- * Test that function print_repository_record() exists in the correct namespace.
- */
- public function testFunctionPrintRepositoryRecordExists() {
- $this->assertEquals(function_exists('print_repository_record'), true);
- }
-
- /**
- * Test that function print_fact_sources() exists in the correct namespace.
- */
- public function testFunctionPrintFactSourcesExists() {
- $this->assertEquals(function_exists('print_fact_sources'), true);
- }
-
- /**
- * Test that function print_media_links() exists in the correct namespace.
- */
- public function testFunctionPrintMediaLinksExists() {
- $this->assertEquals(function_exists('print_media_links'), true);
- }
-
- /**
- * Test that function print_main_sources() exists in the correct namespace.
- */
- public function testFunctionPrintMainSourcesExists() {
- $this->assertEquals(function_exists('print_main_sources'), true);
- }
-
- /**
- * Test that function printSourceStructure() exists in the correct namespace.
- */
- public function testFunctionPrintSourceStructureExists() {
- $this->assertEquals(function_exists('printSourceStructure'), true);
- }
-
- /**
- * Test that function getSourceStructure() exists in the correct namespace.
- */
- public function testFunctionGetSourceStructureExists() {
- $this->assertEquals(function_exists('getSourceStructure'), true);
- }
-
- /**
- * Test that function print_main_notes() exists in the correct namespace.
- */
- public function testFunctionPrintMainNotesExists() {
- $this->assertEquals(function_exists('print_main_notes'), true);
- }
-
- /**
- * Test that function print_main_media() exists in the correct namespace.
- */
- public function testFunctionPrintMainMediaExists() {
- $this->assertEquals(function_exists('print_main_media'), true);
- }
-}
diff --git a/tests/includes/functions/FunctionsPrintListsTest.php b/tests/includes/functions/FunctionsPrintListsTest.php
deleted file mode 100644
index bef2be0aab..0000000000
--- a/tests/includes/functions/FunctionsPrintListsTest.php
+++ /dev/null
@@ -1,132 +0,0 @@
-<?php
-
-/**
- * webtrees: online genealogy
- * Copyright (C) 2015 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 <http://www.gnu.org/licenses/>.
- */
-
-/**
- * Unit tests for the global functions in the file includes/functions/functions_print_lists.php
- */
-class FunctionsPrintListsTest extends PHPUnit_Framework_TestCase {
- /**
- * Prepare the environment for these tests
- */
- public function setUp() {
- }
-
- /**
- * Test that function format_indi_table() exists in the correct namespace.
- */
- public function testFunctionFormatIndiTableExists() {
- $this->assertEquals(function_exists('format_indi_table'), true);
- }
-
- /**
- * Test that function format_fam_table() exists in the correct namespace.
- */
- public function testFunctionFormatFamTableExists() {
- $this->assertEquals(function_exists('format_fam_table'), true);
- }
-
- /**
- * Test that function format_sour_table() exists in the correct namespace.
- */
- public function testFunctionFormatSourTableExists() {
- $this->assertEquals(function_exists('format_sour_table'), true);
- }
-
- /**
- * Test that function format_note_table() exists in the correct namespace.
- */
- public function testFunctionFormatNoteTableExists() {
- $this->assertEquals(function_exists('format_note_table'), true);
- }
-
- /**
- * Test that function format_repo_table() exists in the correct namespace.
- */
- public function testFunctionFormatRepoTableExists() {
- $this->assertEquals(function_exists('format_repo_table'), true);
- }
-
- /**
- * Test that function format_media_table() exists in the correct namespace.
- */
- public function testFunctionFormatMediaTableExists() {
- $this->assertEquals(function_exists('format_media_table'), true);
- }
-
- /**
- * Test that function format_surname_table() exists in the correct namespace.
- */
- public function testFunctionFormatSurnameTableExists() {
- $this->assertEquals(function_exists('format_surname_table'), true);
- }
-
- /**
- * Test that function format_surname_tagcloud() exists in the correct namespace.
- */
- public function testFunctionFormatSurnameTagcloudExists() {
- $this->assertEquals(function_exists('format_surname_tagcloud'), true);
- }
-
- /**
- * Test that function format_surname_list() exists in the correct namespace.
- */
- public function testFunctionFormatSurnameListExists() {
- $this->assertEquals(function_exists('format_surname_list'), true);
- }
-
- /**
- * Test that function print_changes_list() exists in the correct namespace.
- */
- public function testFunctionPrintChangesListExists() {
- $this->assertEquals(function_exists('print_changes_list'), true);
- }
-
- /**
- * Test that function print_changes_table() exists in the correct namespace.
- */
- public function testFunctionPrintChangesTableExists() {
- $this->assertEquals(function_exists('print_changes_table'), true);
- }
-
- /**
- * Test that function print_events_table() exists in the correct namespace.
- */
- public function testFunctionPrintEventsTableExists() {
- $this->assertEquals(function_exists('print_events_table'), true);
- }
-
- /**
- * Test that function print_events_list() exists in the correct namespace.
- */
- public function testFunctionPrintEventsListExists() {
- $this->assertEquals(function_exists('print_events_list'), true);
- }
-
- /**
- * Test that function print_chart_by_age() exists in the correct namespace.
- */
- public function testFunctionPrintChartByAgeExists() {
- $this->assertEquals(function_exists('print_chart_by_age'), true);
- }
-
- /**
- * Test that function print_chart_by_decade() exists in the correct namespace.
- */
- public function testFunctionPrintChartByDecadeExists() {
- $this->assertEquals(function_exists('print_chart_by_decade'), true);
- }
-}
diff --git a/tests/includes/functions/FunctionsPrintTest.php b/tests/includes/functions/FunctionsPrintTest.php
deleted file mode 100644
index 688c29ecdb..0000000000
--- a/tests/includes/functions/FunctionsPrintTest.php
+++ /dev/null
@@ -1,196 +0,0 @@
-<?php
-
-/**
- * webtrees: online genealogy
- * Copyright (C) 2015 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 <http://www.gnu.org/licenses/>.
- */
-
-/**
- * Unit tests for the global functions in the file includes/functions/functions_print.php
- */
-class FunctionsPrintTest extends PHPUnit_Framework_TestCase {
- /**
- * Prepare the environment for these tests
- */
- public function setUp() {
- }
-
- /**
- * Test that function print_pedigree_person() exists in the correct namespace.
- */
- public function testFunctionPrintPedigreePersonExists() {
- $this->assertEquals(function_exists('print_pedigree_person'), true);
- }
-
- /**
- /**
- * Test that function print_note_record() exists in the correct namespace.
- */
- public function testFunctionPrintNoteRecordExists() {
- $this->assertEquals(function_exists('print_note_record'), true);
- }
-
- /**
- * Test that function print_fact_notes() exists in the correct namespace.
- */
- public function testFunctionPrintFactNotesExists() {
- $this->assertEquals(function_exists('print_fact_notes'), true);
- }
-
- /**
- * Test that function help_link() exists in the correct namespace.
- */
- public function testFunctionHelpLinkExists() {
- $this->assertEquals(function_exists('help_link'), true);
- }
-
- /**
- * Test that function wiki_help_link() exists in the correct namespace.
- */
- public function testFunctionWikiHelpLinkExists() {
- $this->assertEquals(function_exists('wiki_help_link'), true);
- }
-
- /**
- * Test that function highlight_search_hits() exists in the correct namespace.
- */
- public function testFunctionHighlightSearchHitsExists() {
- $this->assertEquals(function_exists('highlight_search_hits'), true);
- }
-
- /**
- * Test that function format_asso_rela_record() exists in the correct namespace.
- */
- public function testFunctionFormatAssoRelaRecordExists() {
- $this->assertEquals(function_exists('format_asso_rela_record'), true);
- }
-
- /**
- * Test that function format_parents_age() exists in the correct namespace.
- */
- public function testFunctionFormatParentsAgeExists() {
- $this->assertEquals(function_exists('format_parents_age'), true);
- }
-
- /**
- * Test that function format_fact_date() exists in the correct namespace.
- */
- public function testFunctionFormatFactDateExists() {
- $this->assertEquals(function_exists('format_fact_date'), true);
- }
-
- /**
- * Test that function format_fact_place() exists in the correct namespace.
- */
- public function testFunctionFormatFactPlaceExists() {
- $this->assertEquals(function_exists('format_fact_place'), true);
- }
-
- /**
- * Test that function CheckFactUnique() exists in the correct namespace.
- */
- public function testFunctionCheckFactUniqueExists() {
- $this->assertEquals(function_exists('CheckFactUnique'), true);
- }
-
- /**
- * Test that function print_add_new_fact() exists in the correct namespace.
- */
- public function testFunctionPrintAddNewFactExists() {
- $this->assertEquals(function_exists('print_add_new_fact'), true);
- }
-
- /**
- * Test that function init_calendar_popup() exists in the correct namespace.
- */
- public function testFunctionInitCalendarPopupExists() {
- $this->assertEquals(function_exists('init_calendar_popup'), true);
- }
-
- /**
- * Test that function print_findindi_link() exists in the correct namespace.
- */
- public function testFunctionPrintFindindiLinkExists() {
- $this->assertEquals(function_exists('print_findindi_link'), true);
- }
-
- /**
- * Test that function print_findplace_link() exists in the correct namespace.
- */
- public function testFunctionPrintFindplaceLinkExists() {
- $this->assertEquals(function_exists('print_findplace_link'), true);
- }
-
- /**
- * Test that function print_findfamily_link() exists in the correct namespace.
- */
- public function testFunctionPrintFindfamilyLinkExists() {
- $this->assertEquals(function_exists('print_findfamily_link'), true);
- }
-
- /**
- * Test that function print_specialchar_link() exists in the correct namespace.
- */
- public function testFunctionPrintSpecialcharLinkExists() {
- $this->assertEquals(function_exists('print_specialchar_link'), true);
- }
-
- /**
- * Test that function print_autopaste_link() exists in the correct namespace.
- */
- public function testFunctionPrintAutopasteLinkExists() {
- $this->assertEquals(function_exists('print_autopaste_link'), true);
- }
-
- /**
- * Test that function print_findsource_link() exists in the correct namespace.
- */
- public function testFunctionPrintFindsourceLinkExists() {
- $this->assertEquals(function_exists('print_findsource_link'), true);
- }
-
- /**
- * Test that function print_findnote_link() exists in the correct namespace.
- */
- public function testFunctionPrintFindnoteLinkExists() {
- $this->assertEquals(function_exists('print_findnote_link'), true);
- }
-
- /**
- * Test that function print_findrepository_link() exists in the correct namespace.
- */
- public function testFunctionPrintFindrepositoryLinkExists() {
- $this->assertEquals(function_exists('print_findrepository_link'), true);
- }
-
- /**
- * Test that function print_findmedia_link() exists in the correct namespace.
- */
- public function testFunctionPrintFindmediaLinkExists() {
- $this->assertEquals(function_exists('print_findmedia_link'), true);
- }
-
- /**
- * Test that function print_findfact_link() exists in the correct namespace.
- */
- public function testFunctionPrintFindfactLinkExists() {
- $this->assertEquals(function_exists('print_findfact_link'), true);
- }
-
- /**
- * Test that function get_lds_glance() exists in the correct namespace.
- */
- public function testFunctionGetLdsGlanceExists() {
- $this->assertEquals(function_exists('get_lds_glance'), true);
- }
-}
diff --git a/tests/includes/functions/FunctionsRtlTest.php b/tests/includes/functions/FunctionsRtlTest.php
deleted file mode 100644
index 75020cd94a..0000000000
--- a/tests/includes/functions/FunctionsRtlTest.php
+++ /dev/null
@@ -1,83 +0,0 @@
-<?php
-
-/**
- * webtrees: online genealogy
- * Copyright (C) 2015 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 <http://www.gnu.org/licenses/>.
- */
-
-/**
- * Unit tests for the global functions in the file includes/functions/functions_rtl.php
- */
-class FunctionsRtlTest extends PHPUnit_Framework_TestCase {
- /**
- * Prepare the environment for these tests
- */
- public function setUp() {
- }
-
- /**
- * Test that function stripLRMRLM() exists in the correct namespace.
- */
- public function testFunctionStripLRMRLMExists() {
- $this->assertEquals(function_exists('stripLRMRLM'), true);
- }
-
- /**
- * Test that function spanLTRRTL() exists in the correct namespace.
- */
- public function testFunctionSpanLTRRTLExists() {
- $this->assertEquals(function_exists('spanLTRRTL'), true);
- }
-
- /**
- * Test that function starredName() exists in the correct namespace.
- */
- public function testFunctionStarredNameExists() {
- $this->assertEquals(function_exists('starredName'), true);
- }
-
- /**
- * Test that function getChar() exists in the correct namespace.
- */
- public function testFunctionGetCharExists() {
- $this->assertEquals(function_exists('getChar'), true);
- }
-
- /**
- * Test that function breakCurrentSpan() exists in the correct namespace.
- */
- public function testFunctionBreakCurrentSpanExists() {
- $this->assertEquals(function_exists('breakCurrentSpan'), true);
- }
-
- /**
- * Test that function beginCurrentSpan() exists in the correct namespace.
- */
- public function testFunctionBeginCurrentSpanExists() {
- $this->assertEquals(function_exists('beginCurrentSpan'), true);
- }
-
- /**
- * Test that function finishCurrentSpan() exists in the correct namespace.
- */
- public function testFunctionFinishCurrentSpanExists() {
- $this->assertEquals(function_exists('finishCurrentSpan'), true);
- }
-
- /**
- * Test that function utf8_wordwrap() exists in the correct namespace.
- */
- public function testFunctionUtf8WordwrapExists() {
- $this->assertEquals(function_exists('utf8_wordwrap'), true);
- }
-}
diff --git a/tests/includes/functions/FunctionsTest.php b/tests/includes/functions/FunctionsTest.php
deleted file mode 100644
index a411c30003..0000000000
--- a/tests/includes/functions/FunctionsTest.php
+++ /dev/null
@@ -1,152 +0,0 @@
-<?php
-
-/**
- * webtrees: online genealogy
- * Copyright (C) 2015 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 <http://www.gnu.org/licenses/>.
- */
-
-/**
- * Unit tests for the global functions in the file includes/functions/functions.php
- */
-class FunctionsTest extends PHPUnit_Framework_TestCase {
- /**
- * Prepare the environment for these tests
- */
- public function setUp() {
- }
-
- /**
- * Test that function fetch_latest_version() exists in the correct namespace.
- */
- public function testFunctionFetchLatestVersionExists() {
- $this->assertEquals(function_exists('fetch_latest_version'), true);
- }
-
- /**
- * Test that function file_upload_error_text() exists in the correct namespace.
- */
- public function testFunctionFileUploadErrorTextExists() {
- $this->assertEquals(function_exists('file_upload_error_text'), true);
- }
-
- /**
- * Test that function get_sub_record() exists in the correct namespace.
- */
- public function testFunctionGetSubRecordExists() {
- $this->assertEquals(function_exists('get_sub_record'), true);
- }
-
- /**
- * Test that function get_cont() exists in the correct namespace.
- */
- public function testFunctionGetContExists() {
- $this->assertEquals(function_exists('get_cont'), true);
- }
-
- /**
- * Test that function event_sort() exists in the correct namespace.
- */
- public function testFunctionEventSortExists() {
- $this->assertEquals(function_exists('event_sort'), true);
- }
-
- /**
- * Test that function event_sort_name() exists in the correct namespace.
- */
- public function testFunctionEventSortNameExists() {
- $this->assertEquals(function_exists('event_sort_name'), true);
- }
-
- /**
- * Test that function sort_facts() exists in the correct namespace.
- */
- public function testFunctionSortFactsExists() {
- $this->assertEquals(function_exists('sort_facts'), true);
- }
-
- /**
- * Test that function get_close_relationship_name() exists in the correct namespace.
- */
- public function testFunctionGetCloseRelationshipNameExists() {
- $this->assertEquals(function_exists('get_close_relationship_name'), true);
- }
-
- /**
- * Test that function get_associate_relationship_name() exists in the correct namespace.
- */
- public function testFunctionGetAssociateRelationshipNameExists() {
- $this->assertEquals(function_exists('get_associate_relationship_name'), true);
- }
-
- /**
- * Test that function get_relationship() exists in the correct namespace.
- */
- public function testFunctionGetRelationshipExists() {
- $this->assertEquals(function_exists('get_relationship'), true);
- }
-
- /**
- * Test that function get_relationship_name() exists in the correct namespace.
- */
- public function testFunctionGetRelationshipNameExists() {
- $this->assertEquals(function_exists('get_relationship_name'), true);
- }
-
- /**
- * Test that function cousin_name() exists in the correct namespace.
- */
- public function testFunctionCousinNameExists() {
- $this->assertEquals(function_exists('cousin_name'), true);
- }
-
- /**
- * Test that function cousin_name2() exists in the correct namespace.
- */
- public function testFunctionCousinName2Exists() {
- $this->assertEquals(function_exists('cousin_name2'), true);
- }
-
- /**
- * Test that function get_relationship_name_from_path() exists in the correct namespace.
- */
- public function testFunctionGetRelationshipNameFromPathExists() {
- $this->assertEquals(function_exists('get_relationship_name_from_path'), true);
- }
-
- /**
- * Test that function get_query_url() exists in the correct namespace.
- */
- public function testFunctionGetQueryUrlExists() {
- $this->assertEquals(function_exists('get_query_url'), true);
- }
-
- /**
- * Test that function isFileExternal() exists in the correct namespace.
- */
- public function testFunctionIsFileExternalExists() {
- $this->assertEquals(function_exists('isFileExternal'), true);
- }
-
- /**
- * Tests for function isFileExternal()
- */
- public function testFunctionIsFileExternal() {
- $this->assertEquals(isFileExternal('http://www.example.com/file.txt'), true);
- $this->assertEquals(isFileExternal('file.txt'), false);
- $this->assertEquals(isFileExternal('folder/file.txt'), false);
- $this->assertEquals(isFileExternal('folder\\file.txt'), false);
- $this->assertEquals(isFileExternal('/folder/file.txt'), false);
- $this->assertEquals(isFileExternal('\\folder\\file.txt'), false);
- $this->assertEquals(isFileExternal('C:\\folder\\file.txt'), false);
- }
-}