From 61a04cfbe4c60352341f0e24e2810e9c5b8080e0 Mon Sep 17 00:00:00 2001 From: matx132 Date: Fri, 28 Jul 2023 12:01:22 +0200 Subject: [PATCH] Corrected tests --- .../RepositoryAuthenticationProvider.php | 4 +- .../_fixtures/extract_content_from_rows.php | 614 +++++++++--------- .../extract_content_from_rows_result.php | 20 +- .../Tests/FieldType/BaseIntegrationTest.php | 8 +- 4 files changed, 324 insertions(+), 322 deletions(-) diff --git a/eZ/Publish/Core/MVC/Symfony/Security/Authentication/RepositoryAuthenticationProvider.php b/eZ/Publish/Core/MVC/Symfony/Security/Authentication/RepositoryAuthenticationProvider.php index a472a33eac..ae1aad61a5 100644 --- a/eZ/Publish/Core/MVC/Symfony/Security/Authentication/RepositoryAuthenticationProvider.php +++ b/eZ/Publish/Core/MVC/Symfony/Security/Authentication/RepositoryAuthenticationProvider.php @@ -114,7 +114,9 @@ private function sleepUsingConstantTimer(float $startTime): void $remainingTime = $this->constantAuthTime - (microtime(true) - $startTime); if ($remainingTime > 0) { - usleep($remainingTime * 1000000); + $microseconds = $remainingTime * 1000000; + + usleep((int)$microseconds); } elseif ($this->logger) { $this->logger->warning( sprintf( diff --git a/eZ/Publish/Core/Persistence/Legacy/Tests/Content/_fixtures/extract_content_from_rows.php b/eZ/Publish/Core/Persistence/Legacy/Tests/Content/_fixtures/extract_content_from_rows.php index a365c8736e..fefffdb5be 100644 --- a/eZ/Publish/Core/Persistence/Legacy/Tests/Content/_fixtures/extract_content_from_rows.php +++ b/eZ/Publish/Core/Persistence/Legacy/Tests/Content/_fixtures/extract_content_from_rows.php @@ -1,314 +1,314 @@ [ - 'ezcontentobject_id' => '226', - 'ezcontentobject_contentclass_id' => '16', - 'ezcontentobject_section_id' => '1', - 'ezcontentobject_owner_id' => '14', - 'ezcontentobject_remote_id' => '95a226fb62c1533f60c16c3769bc7c6c', - 'ezcontentobject_current_version' => '2', - 'ezcontentobject_initial_language_id' => '2', - 'ezcontentobject_modified' => '1313061404', - 'ezcontentobject_published' => '1313047907', - 'ezcontentobject_status' => '1', - 'ezcontentobject_name' => 'Something', - 'ezcontentobject_language_mask' => '2', - 'ezcontentobject_is_hidden' => '0', - 'ezcontentobject_version_id' => '676', - 'ezcontentobject_version_version' => '2', - 'ezcontentobject_version_modified' => '1313061404', - 'ezcontentobject_version_creator_id' => '14', - 'ezcontentobject_version_created' => '1313061317', - 'ezcontentobject_version_status' => '1', - 'ezcontentobject_version_language_mask' => '3', - 'ezcontentobject_version_initial_language_id' => '2', - 'ezcontentobject_attribute_id' => '4000', - 'ezcontentobject_attribute_contentclassattribute_id' => '193', - 'ezcontentobject_attribute_data_type_string' => 'ezkeyword', - 'ezcontentobject_attribute_language_code' => 'eng-GB', - 'ezcontentobject_attribute_language_id' => '4', - 'ezcontentobject_attribute_data_float' => '0.0', - 'ezcontentobject_attribute_data_int' => null, - 'ezcontentobject_attribute_data_text' => '', - 'ezcontentobject_attribute_sort_key_int' => '0', - 'ezcontentobject_attribute_sort_key_string' => '', - 'ezcontentobject_tree_main_node_id' => '228', - ], - 1 => [ - 'ezcontentobject_id' => '226', - 'ezcontentobject_contentclass_id' => '16', - 'ezcontentobject_section_id' => '1', - 'ezcontentobject_owner_id' => '14', - 'ezcontentobject_remote_id' => '95a226fb62c1533f60c16c3769bc7c6c', - 'ezcontentobject_current_version' => '2', - 'ezcontentobject_initial_language_id' => '2', - 'ezcontentobject_modified' => '1313061404', - 'ezcontentobject_published' => '1313047907', - 'ezcontentobject_status' => '1', - 'ezcontentobject_name' => 'Something', - 'ezcontentobject_language_mask' => '2', - 'ezcontentobject_version_id' => '676', - 'ezcontentobject_version_version' => '2', - 'ezcontentobject_version_modified' => '1313061404', - 'ezcontentobject_version_creator_id' => '14', - 'ezcontentobject_version_created' => '1313061317', - 'ezcontentobject_version_status' => '1', - 'ezcontentobject_version_language_mask' => '3', - 'ezcontentobject_version_initial_language_id' => '2', - 'ezcontentobject_attribute_id' => '1332', - 'ezcontentobject_attribute_contentclassattribute_id' => '183', - 'ezcontentobject_attribute_data_type_string' => 'ezstring', - 'ezcontentobject_attribute_language_code' => 'eng-US', - 'ezcontentobject_attribute_language_id' => '2', - 'ezcontentobject_attribute_data_float' => '0.0', - 'ezcontentobject_attribute_data_int' => null, - 'ezcontentobject_attribute_data_text' => 'New test article (2)', - 'ezcontentobject_attribute_sort_key_int' => '0', - 'ezcontentobject_attribute_sort_key_string' => 'new test article (2)', - 'ezcontentobject_tree_main_node_id' => '228', - 'ezcontentobject_is_hidden' => '0', - ], - 2 => [ - 'ezcontentobject_id' => '226', - 'ezcontentobject_contentclass_id' => '16', - 'ezcontentobject_section_id' => '1', - 'ezcontentobject_owner_id' => '14', - 'ezcontentobject_remote_id' => '95a226fb62c1533f60c16c3769bc7c6c', - 'ezcontentobject_current_version' => '2', - 'ezcontentobject_initial_language_id' => '2', - 'ezcontentobject_modified' => '1313061404', - 'ezcontentobject_published' => '1313047907', - 'ezcontentobject_status' => '1', - 'ezcontentobject_name' => 'Something', - 'ezcontentobject_language_mask' => '2', - 'ezcontentobject_version_id' => '676', - 'ezcontentobject_version_version' => '2', - 'ezcontentobject_version_modified' => '1313061404', - 'ezcontentobject_version_creator_id' => '14', - 'ezcontentobject_version_created' => '1313061317', - 'ezcontentobject_version_status' => '1', - 'ezcontentobject_version_language_mask' => '3', - 'ezcontentobject_version_initial_language_id' => '2', - 'ezcontentobject_attribute_id' => '1333', - 'ezcontentobject_attribute_contentclassattribute_id' => '184', - 'ezcontentobject_attribute_data_type_string' => 'ezstring', - 'ezcontentobject_attribute_language_code' => 'eng-US', - 'ezcontentobject_attribute_language_id' => '2', - 'ezcontentobject_attribute_data_float' => '0.0', - 'ezcontentobject_attribute_data_int' => null, - 'ezcontentobject_attribute_data_text' => 'Something', - 'ezcontentobject_attribute_sort_key_int' => '0', - 'ezcontentobject_attribute_sort_key_string' => 'something', - 'ezcontentobject_tree_main_node_id' => '228', - 'ezcontentobject_is_hidden' => '0', - ], - 3 => [ - 'ezcontentobject_id' => '226', - 'ezcontentobject_contentclass_id' => '16', - 'ezcontentobject_section_id' => '1', - 'ezcontentobject_owner_id' => '14', - 'ezcontentobject_remote_id' => '95a226fb62c1533f60c16c3769bc7c6c', - 'ezcontentobject_current_version' => '2', - 'ezcontentobject_initial_language_id' => '2', - 'ezcontentobject_modified' => '1313061404', - 'ezcontentobject_published' => '1313047907', - 'ezcontentobject_status' => '1', - 'ezcontentobject_name' => 'Something', - 'ezcontentobject_language_mask' => '2', - 'ezcontentobject_version_id' => '676', - 'ezcontentobject_version_version' => '2', - 'ezcontentobject_version_modified' => '1313061404', - 'ezcontentobject_version_creator_id' => '14', - 'ezcontentobject_version_created' => '1313061317', - 'ezcontentobject_version_status' => '1', - 'ezcontentobject_version_language_mask' => '3', - 'ezcontentobject_version_initial_language_id' => '2', - 'ezcontentobject_attribute_id' => '1334', - 'ezcontentobject_attribute_contentclassattribute_id' => '185', - 'ezcontentobject_attribute_data_type_string' => 'ezauthor', - 'ezcontentobject_attribute_language_code' => 'eng-US', - 'ezcontentobject_attribute_language_id' => '2', - 'ezcontentobject_attribute_data_float' => '0.0', - 'ezcontentobject_attribute_data_int' => null, - 'ezcontentobject_attribute_data_text' => ' + 0 => [ + 'ezcontentobject_id' => 226, + 'ezcontentobject_contentclass_id' => 16, + 'ezcontentobject_section_id' => 1, + 'ezcontentobject_owner_id' => 14, + 'ezcontentobject_remote_id' => '95a226fb62c1533f60c16c3769bc7c6c', + 'ezcontentobject_current_version' => 2, + 'ezcontentobject_initial_language_id' => 2, + 'ezcontentobject_modified' => 1313061404, + 'ezcontentobject_published' => 1313047907, + 'ezcontentobject_status' => 1, + 'ezcontentobject_name' => 'Something', + 'ezcontentobject_language_mask' => 2, + 'ezcontentobject_is_hidden' => 0, + 'ezcontentobject_version_id' => 676, + 'ezcontentobject_version_version' => 2, + 'ezcontentobject_version_modified' => 1313061404, + 'ezcontentobject_version_creator_id' => 14, + 'ezcontentobject_version_created' => 1313061317, + 'ezcontentobject_version_status' => 1, + 'ezcontentobject_version_language_mask' => 3, + 'ezcontentobject_version_initial_language_id' => 2, + 'ezcontentobject_attribute_id' => 1332, + 'ezcontentobject_attribute_contentclassattribute_id' => 183, + 'ezcontentobject_attribute_data_type_string' => 'ezstring', + 'ezcontentobject_attribute_language_code' => 'eng-US', + 'ezcontentobject_attribute_language_id' => 2, + 'ezcontentobject_attribute_data_float' => 0.0, + 'ezcontentobject_attribute_data_int' => null, + 'ezcontentobject_attribute_data_text' => 'New test article (2)', + 'ezcontentobject_attribute_sort_key_int' => 0, + 'ezcontentobject_attribute_sort_key_string' => 'new test article (2)', + 'ezcontentobject_tree_main_node_id' => 228, + ], + 1 => [ + 'ezcontentobject_id' => 226, + 'ezcontentobject_contentclass_id' => 16, + 'ezcontentobject_section_id' => 1, + 'ezcontentobject_owner_id' => 14, + 'ezcontentobject_remote_id' => '95a226fb62c1533f60c16c3769bc7c6c', + 'ezcontentobject_current_version' => 2, + 'ezcontentobject_initial_language_id' => 2, + 'ezcontentobject_modified' => 1313061404, + 'ezcontentobject_published' => 1313047907, + 'ezcontentobject_status' => 1, + 'ezcontentobject_name' => 'Something', + 'ezcontentobject_language_mask' => 2, + 'ezcontentobject_version_id' => 676, + 'ezcontentobject_version_version' => 2, + 'ezcontentobject_version_modified' => 1313061404, + 'ezcontentobject_version_creator_id' => 14, + 'ezcontentobject_version_created' => 1313061317, + 'ezcontentobject_version_status' => 1, + 'ezcontentobject_version_language_mask' => 3, + 'ezcontentobject_version_initial_language_id' => 2, + 'ezcontentobject_attribute_id' => 1333, + 'ezcontentobject_attribute_contentclassattribute_id' => 184, + 'ezcontentobject_attribute_data_type_string' => 'ezstring', + 'ezcontentobject_attribute_language_code' => 'eng-US', + 'ezcontentobject_attribute_language_id' => 2, + 'ezcontentobject_attribute_data_float' => 0.0, + 'ezcontentobject_attribute_data_int' => null, + 'ezcontentobject_attribute_data_text' => 'Something', + 'ezcontentobject_attribute_sort_key_int' => 0, + 'ezcontentobject_attribute_sort_key_string' => 'something', + 'ezcontentobject_tree_main_node_id' => 228, + 'ezcontentobject_is_hidden' => 0, + ], + 2 => [ + 'ezcontentobject_id' => 226, + 'ezcontentobject_contentclass_id' => 16, + 'ezcontentobject_section_id' => 1, + 'ezcontentobject_owner_id' => 14, + 'ezcontentobject_remote_id' => '95a226fb62c1533f60c16c3769bc7c6c', + 'ezcontentobject_current_version' => 2, + 'ezcontentobject_initial_language_id' => 2, + 'ezcontentobject_modified' => 1313061404, + 'ezcontentobject_published' => 1313047907, + 'ezcontentobject_status' => 1, + 'ezcontentobject_name' => 'Something', + 'ezcontentobject_language_mask' => 2, + 'ezcontentobject_version_id' => 676, + 'ezcontentobject_version_version' => 2, + 'ezcontentobject_version_modified' => 1313061404, + 'ezcontentobject_version_creator_id' => 14, + 'ezcontentobject_version_created' => 1313061317, + 'ezcontentobject_version_status' => 1, + 'ezcontentobject_version_language_mask' => 3, + 'ezcontentobject_version_initial_language_id' => 2, + 'ezcontentobject_attribute_id' => 1334, + 'ezcontentobject_attribute_contentclassattribute_id' => 185, + 'ezcontentobject_attribute_data_type_string' => 'ezauthor', + 'ezcontentobject_attribute_language_code' => 'eng-US', + 'ezcontentobject_attribute_language_id' => 2, + 'ezcontentobject_attribute_data_float' => 0.0, + 'ezcontentobject_attribute_data_int' => null, + 'ezcontentobject_attribute_data_text' => ' ', - 'ezcontentobject_attribute_sort_key_int' => '0', - 'ezcontentobject_attribute_sort_key_string' => '', - 'ezcontentobject_tree_main_node_id' => '228', - 'ezcontentobject_is_hidden' => '0', - ], - 4 => [ - 'ezcontentobject_id' => '226', - 'ezcontentobject_contentclass_id' => '16', - 'ezcontentobject_section_id' => '1', - 'ezcontentobject_owner_id' => '14', - 'ezcontentobject_remote_id' => '95a226fb62c1533f60c16c3769bc7c6c', - 'ezcontentobject_current_version' => '2', - 'ezcontentobject_initial_language_id' => '2', - 'ezcontentobject_modified' => '1313061404', - 'ezcontentobject_published' => '1313047907', - 'ezcontentobject_status' => '1', - 'ezcontentobject_name' => 'Something', - 'ezcontentobject_language_mask' => '2', - 'ezcontentobject_version_id' => '676', - 'ezcontentobject_version_version' => '2', - 'ezcontentobject_version_modified' => '1313061404', - 'ezcontentobject_version_creator_id' => '14', - 'ezcontentobject_version_created' => '1313061317', - 'ezcontentobject_version_status' => '1', - 'ezcontentobject_version_language_mask' => '3', - 'ezcontentobject_version_initial_language_id' => '2', - 'ezcontentobject_attribute_id' => '1337', - 'ezcontentobject_attribute_contentclassattribute_id' => '188', - 'ezcontentobject_attribute_data_type_string' => 'ezboolean', - 'ezcontentobject_attribute_language_code' => 'eng-US', - 'ezcontentobject_attribute_language_id' => '2', - 'ezcontentobject_attribute_data_float' => '0.0', - 'ezcontentobject_attribute_data_int' => '1', - 'ezcontentobject_attribute_data_text' => '', - 'ezcontentobject_attribute_sort_key_int' => '1', - 'ezcontentobject_attribute_sort_key_string' => '', - 'ezcontentobject_tree_main_node_id' => '228', - 'ezcontentobject_is_hidden' => '0', - ], - 5 => [ - 'ezcontentobject_id' => '226', - 'ezcontentobject_contentclass_id' => '16', - 'ezcontentobject_section_id' => '1', - 'ezcontentobject_owner_id' => '14', - 'ezcontentobject_remote_id' => '95a226fb62c1533f60c16c3769bc7c6c', - 'ezcontentobject_current_version' => '2', - 'ezcontentobject_initial_language_id' => '2', - 'ezcontentobject_modified' => '1313061404', - 'ezcontentobject_published' => '1313047907', - 'ezcontentobject_status' => '1', - 'ezcontentobject_name' => 'Something', - 'ezcontentobject_language_mask' => '2', - 'ezcontentobject_version_id' => '676', - 'ezcontentobject_version_version' => '2', - 'ezcontentobject_version_modified' => '1313061404', - 'ezcontentobject_version_creator_id' => '14', - 'ezcontentobject_version_created' => '1313061317', - 'ezcontentobject_version_status' => '1', - 'ezcontentobject_version_language_mask' => '3', - 'ezcontentobject_version_initial_language_id' => '2', - 'ezcontentobject_attribute_id' => '1338', - 'ezcontentobject_attribute_contentclassattribute_id' => '189', - 'ezcontentobject_attribute_data_type_string' => 'ezimage', - 'ezcontentobject_attribute_language_code' => 'eng-US', - 'ezcontentobject_attribute_language_id' => '2', - 'ezcontentobject_attribute_data_float' => '0.0', - 'ezcontentobject_attribute_data_int' => null, - 'ezcontentobject_attribute_data_text' => ' + 'ezcontentobject_attribute_sort_key_int' => 0, + 'ezcontentobject_attribute_sort_key_string' => '', + 'ezcontentobject_tree_main_node_id' => 228, + 'ezcontentobject_is_hidden' => 0, + ], + 3 => [ + 'ezcontentobject_id' => 226, + 'ezcontentobject_contentclass_id' => 16, + 'ezcontentobject_section_id' => 1, + 'ezcontentobject_owner_id' => 14, + 'ezcontentobject_remote_id' => '95a226fb62c1533f60c16c3769bc7c6c', + 'ezcontentobject_current_version' => 2, + 'ezcontentobject_initial_language_id' => 2, + 'ezcontentobject_modified' => 1313061404, + 'ezcontentobject_published' => 1313047907, + 'ezcontentobject_status' => 1, + 'ezcontentobject_name' => 'Something', + 'ezcontentobject_language_mask' => 2, + 'ezcontentobject_version_id' => 676, + 'ezcontentobject_version_version' => 2, + 'ezcontentobject_version_modified' => 1313061404, + 'ezcontentobject_version_creator_id' => 14, + 'ezcontentobject_version_created' => 1313061317, + 'ezcontentobject_version_status' => 1, + 'ezcontentobject_version_language_mask' => 3, + 'ezcontentobject_version_initial_language_id' => 2, + 'ezcontentobject_attribute_id' => 1337, + 'ezcontentobject_attribute_contentclassattribute_id' => 188, + 'ezcontentobject_attribute_data_type_string' => 'ezboolean', + 'ezcontentobject_attribute_language_code' => 'eng-US', + 'ezcontentobject_attribute_language_id' => 2, + 'ezcontentobject_attribute_data_float' => 0.0, + 'ezcontentobject_attribute_data_int' => 1, + 'ezcontentobject_attribute_data_text' => '', + 'ezcontentobject_attribute_sort_key_int' => 1, + 'ezcontentobject_attribute_sort_key_string' => '', + 'ezcontentobject_tree_main_node_id' => 228, + 'ezcontentobject_is_hidden' => 0, + ], + 4 => [ + 'ezcontentobject_id' => 226, + 'ezcontentobject_contentclass_id' => 16, + 'ezcontentobject_section_id' => 1, + 'ezcontentobject_owner_id' => 14, + 'ezcontentobject_remote_id' => '95a226fb62c1533f60c16c3769bc7c6c', + 'ezcontentobject_current_version' => 2, + 'ezcontentobject_initial_language_id' => 2, + 'ezcontentobject_modified' => 1313061404, + 'ezcontentobject_published' => 1313047907, + 'ezcontentobject_status' => 1, + 'ezcontentobject_name' => 'Something', + 'ezcontentobject_language_mask' => 2, + 'ezcontentobject_version_id' => 676, + 'ezcontentobject_version_version' => 2, + 'ezcontentobject_version_modified' => 1313061404, + 'ezcontentobject_version_creator_id' => 14, + 'ezcontentobject_version_created' => 1313061317, + 'ezcontentobject_version_status' => 1, + 'ezcontentobject_version_language_mask' => 3, + 'ezcontentobject_version_initial_language_id' => 2, + 'ezcontentobject_attribute_id' => 1338, + 'ezcontentobject_attribute_contentclassattribute_id' => 189, + 'ezcontentobject_attribute_data_type_string' => 'ezimage', + 'ezcontentobject_attribute_language_code' => 'eng-US', + 'ezcontentobject_attribute_language_id' => 2, + 'ezcontentobject_attribute_data_float' => 0.0, + 'ezcontentobject_attribute_data_int' => null, + 'ezcontentobject_attribute_data_text' => ' ', - 'ezcontentobject_attribute_sort_key_int' => '0', - 'ezcontentobject_attribute_sort_key_string' => '', - 'ezcontentobject_tree_main_node_id' => '228', - 'ezcontentobject_is_hidden' => '0', - ], - 6 => [ - 'ezcontentobject_id' => '226', - 'ezcontentobject_contentclass_id' => '16', - 'ezcontentobject_section_id' => '1', - 'ezcontentobject_owner_id' => '14', - 'ezcontentobject_remote_id' => '95a226fb62c1533f60c16c3769bc7c6c', - 'ezcontentobject_current_version' => '2', - 'ezcontentobject_initial_language_id' => '2', - 'ezcontentobject_modified' => '1313061404', - 'ezcontentobject_published' => '1313047907', - 'ezcontentobject_status' => '1', - 'ezcontentobject_name' => 'Something', - 'ezcontentobject_language_mask' => '2', - 'ezcontentobject_version_id' => '676', - 'ezcontentobject_version_version' => '2', - 'ezcontentobject_version_modified' => '1313061404', - 'ezcontentobject_version_creator_id' => '14', - 'ezcontentobject_version_created' => '1313061317', - 'ezcontentobject_version_status' => '1', - 'ezcontentobject_version_language_mask' => '3', - 'ezcontentobject_version_initial_language_id' => '2', - 'ezcontentobject_attribute_id' => '1340', - 'ezcontentobject_attribute_contentclassattribute_id' => '191', - 'ezcontentobject_attribute_data_type_string' => 'ezdatetime', - 'ezcontentobject_attribute_language_code' => 'eng-US', - 'ezcontentobject_attribute_language_id' => '2', - 'ezcontentobject_attribute_data_float' => '0.0', - 'ezcontentobject_attribute_data_int' => '0', - 'ezcontentobject_attribute_data_text' => '', - 'ezcontentobject_attribute_sort_key_int' => '0', - 'ezcontentobject_attribute_sort_key_string' => '', - 'ezcontentobject_tree_main_node_id' => '228', - 'ezcontentobject_is_hidden' => '0', - ], - 7 => [ - 'ezcontentobject_id' => '226', - 'ezcontentobject_contentclass_id' => '16', - 'ezcontentobject_section_id' => '1', - 'ezcontentobject_owner_id' => '14', - 'ezcontentobject_remote_id' => '95a226fb62c1533f60c16c3769bc7c6c', - 'ezcontentobject_current_version' => '2', - 'ezcontentobject_initial_language_id' => '2', - 'ezcontentobject_modified' => '1313061404', - 'ezcontentobject_published' => '1313047907', - 'ezcontentobject_status' => '1', - 'ezcontentobject_name' => 'Something', - 'ezcontentobject_language_mask' => '2', - 'ezcontentobject_version_id' => '676', - 'ezcontentobject_version_version' => '2', - 'ezcontentobject_version_modified' => '1313061404', - 'ezcontentobject_version_creator_id' => '14', - 'ezcontentobject_version_created' => '1313061317', - 'ezcontentobject_version_status' => '1', - 'ezcontentobject_version_language_mask' => '3', - 'ezcontentobject_version_initial_language_id' => '2', - 'ezcontentobject_attribute_id' => '1341', - 'ezcontentobject_attribute_contentclassattribute_id' => '192', - 'ezcontentobject_attribute_data_type_string' => 'ezdatetime', - 'ezcontentobject_attribute_language_code' => 'eng-US', - 'ezcontentobject_attribute_language_id' => '2', - 'ezcontentobject_attribute_data_float' => '0.0', - 'ezcontentobject_attribute_data_int' => '0', - 'ezcontentobject_attribute_data_text' => '', - 'ezcontentobject_attribute_sort_key_int' => '0', - 'ezcontentobject_attribute_sort_key_string' => '', - 'ezcontentobject_tree_main_node_id' => '228', - 'ezcontentobject_is_hidden' => '0', - ], - 8 => [ - 'ezcontentobject_id' => '226', - 'ezcontentobject_contentclass_id' => '16', - 'ezcontentobject_section_id' => '1', - 'ezcontentobject_owner_id' => '14', - 'ezcontentobject_remote_id' => '95a226fb62c1533f60c16c3769bc7c6c', - 'ezcontentobject_current_version' => '2', - 'ezcontentobject_initial_language_id' => '2', - 'ezcontentobject_modified' => '1313061404', - 'ezcontentobject_published' => '1313047907', - 'ezcontentobject_status' => '1', - 'ezcontentobject_name' => 'Something', - 'ezcontentobject_language_mask' => '2', - 'ezcontentobject_version_id' => '676', - 'ezcontentobject_version_version' => '2', - 'ezcontentobject_version_modified' => '1313061404', - 'ezcontentobject_version_creator_id' => '14', - 'ezcontentobject_version_created' => '1313061317', - 'ezcontentobject_version_status' => '1', - 'ezcontentobject_version_language_mask' => '3', - 'ezcontentobject_version_initial_language_id' => '2', - 'ezcontentobject_attribute_id' => '1342', - 'ezcontentobject_attribute_contentclassattribute_id' => '193', - 'ezcontentobject_attribute_data_type_string' => 'ezkeyword', - 'ezcontentobject_attribute_language_code' => 'eng-US', - 'ezcontentobject_attribute_language_id' => '2', - 'ezcontentobject_attribute_data_float' => '0.0', - 'ezcontentobject_attribute_data_int' => null, - 'ezcontentobject_attribute_data_text' => '', - 'ezcontentobject_attribute_sort_key_int' => '0', - 'ezcontentobject_attribute_sort_key_string' => '', - 'ezcontentobject_tree_main_node_id' => '228', - 'ezcontentobject_is_hidden' => '0', - ], -]; + 'ezcontentobject_attribute_sort_key_int' => 0, + 'ezcontentobject_attribute_sort_key_string' => '', + 'ezcontentobject_tree_main_node_id' => 228, + 'ezcontentobject_is_hidden' => 0, + ], + 5 => [ + 'ezcontentobject_id' => 226, + 'ezcontentobject_contentclass_id' => 16, + 'ezcontentobject_section_id' => 1, + 'ezcontentobject_owner_id' => 14, + 'ezcontentobject_remote_id' => '95a226fb62c1533f60c16c3769bc7c6c', + 'ezcontentobject_current_version' => 2, + 'ezcontentobject_initial_language_id' => 2, + 'ezcontentobject_modified' => 1313061404, + 'ezcontentobject_published' => 1313047907, + 'ezcontentobject_status' => 1, + 'ezcontentobject_name' => 'Something', + 'ezcontentobject_language_mask' => 2, + 'ezcontentobject_version_id' => 676, + 'ezcontentobject_version_version' => 2, + 'ezcontentobject_version_modified' => 1313061404, + 'ezcontentobject_version_creator_id' => 14, + 'ezcontentobject_version_created' => 1313061317, + 'ezcontentobject_version_status' => 1, + 'ezcontentobject_version_language_mask' => 3, + 'ezcontentobject_version_initial_language_id' => 2, + 'ezcontentobject_attribute_id' => 1340, + 'ezcontentobject_attribute_contentclassattribute_id' => 191, + 'ezcontentobject_attribute_data_type_string' => 'ezdatetime', + 'ezcontentobject_attribute_language_code' => 'eng-US', + 'ezcontentobject_attribute_language_id' => 2, + 'ezcontentobject_attribute_data_float' => 0.0, + 'ezcontentobject_attribute_data_int' => 0, + 'ezcontentobject_attribute_data_text' => '', + 'ezcontentobject_attribute_sort_key_int' => 0, + 'ezcontentobject_attribute_sort_key_string' => '', + 'ezcontentobject_tree_main_node_id' => 228, + 'ezcontentobject_is_hidden' => 0, + ], + 6 => [ + 'ezcontentobject_id' => 226, + 'ezcontentobject_contentclass_id' => 16, + 'ezcontentobject_section_id' => 1, + 'ezcontentobject_owner_id' => 14, + 'ezcontentobject_remote_id' => '95a226fb62c1533f60c16c3769bc7c6c', + 'ezcontentobject_current_version' => 2, + 'ezcontentobject_initial_language_id' => 2, + 'ezcontentobject_modified' => 1313061404, + 'ezcontentobject_published' => 1313047907, + 'ezcontentobject_status' => 1, + 'ezcontentobject_name' => 'Something', + 'ezcontentobject_language_mask' => 2, + 'ezcontentobject_version_id' => 676, + 'ezcontentobject_version_version' => 2, + 'ezcontentobject_version_modified' => 1313061404, + 'ezcontentobject_version_creator_id' => 14, + 'ezcontentobject_version_created' => 1313061317, + 'ezcontentobject_version_status' => 1, + 'ezcontentobject_version_language_mask' => 3, + 'ezcontentobject_version_initial_language_id' => 2, + 'ezcontentobject_attribute_id' => 1341, + 'ezcontentobject_attribute_contentclassattribute_id' => 192, + 'ezcontentobject_attribute_data_type_string' => 'ezdatetime', + 'ezcontentobject_attribute_language_code' => 'eng-US', + 'ezcontentobject_attribute_language_id' => 2, + 'ezcontentobject_attribute_data_float' => 0.0, + 'ezcontentobject_attribute_data_int' => 0, + 'ezcontentobject_attribute_data_text' => '', + 'ezcontentobject_attribute_sort_key_int' => 0, + 'ezcontentobject_attribute_sort_key_string' => '', + 'ezcontentobject_tree_main_node_id' => 228, + 'ezcontentobject_is_hidden' => 0, + ], + 7 => [ + 'ezcontentobject_id' => 226, + 'ezcontentobject_contentclass_id' => 16, + 'ezcontentobject_section_id' => 1, + 'ezcontentobject_owner_id' => 14, + 'ezcontentobject_remote_id' => '95a226fb62c1533f60c16c3769bc7c6c', + 'ezcontentobject_current_version' => 2, + 'ezcontentobject_initial_language_id' => 2, + 'ezcontentobject_modified' => 1313061404, + 'ezcontentobject_published' => 1313047907, + 'ezcontentobject_status' => 1, + 'ezcontentobject_name' => 'Something', + 'ezcontentobject_language_mask' => 2, + 'ezcontentobject_version_id' => 676, + 'ezcontentobject_version_version' => 2, + 'ezcontentobject_version_modified' => 1313061404, + 'ezcontentobject_version_creator_id' => 14, + 'ezcontentobject_version_created' => 1313061317, + 'ezcontentobject_version_status' => 1, + 'ezcontentobject_version_language_mask' => 3, + 'ezcontentobject_version_initial_language_id' => 2, + 'ezcontentobject_attribute_id' => 1342, + 'ezcontentobject_attribute_contentclassattribute_id' => 193, + 'ezcontentobject_attribute_data_type_string' => 'ezkeyword', + 'ezcontentobject_attribute_language_code' => 'eng-US', + 'ezcontentobject_attribute_language_id' => 2, + 'ezcontentobject_attribute_data_float' => 0.0, + 'ezcontentobject_attribute_data_int' => null, + 'ezcontentobject_attribute_data_text' => '', + 'ezcontentobject_attribute_sort_key_int' => 0, + 'ezcontentobject_attribute_sort_key_string' => '', + 'ezcontentobject_tree_main_node_id' => 228, + 'ezcontentobject_is_hidden' => 0, + ], + 8 => [ + 'ezcontentobject_id' => 226, + 'ezcontentobject_contentclass_id' => 16, + 'ezcontentobject_section_id' => 1, + 'ezcontentobject_owner_id' => 14, + 'ezcontentobject_remote_id' => '95a226fb62c1533f60c16c3769bc7c6c', + 'ezcontentobject_current_version' => 2, + 'ezcontentobject_initial_language_id' => 2, + 'ezcontentobject_modified' => 1313061404, + 'ezcontentobject_published' => 1313047907, + 'ezcontentobject_status' => 1, + 'ezcontentobject_name' => 'Something', + 'ezcontentobject_language_mask' => 2, + 'ezcontentobject_version_id' => 676, + 'ezcontentobject_version_version' => 2, + 'ezcontentobject_version_modified' => 1313061404, + 'ezcontentobject_version_creator_id' => 14, + 'ezcontentobject_version_created' => 1313061317, + 'ezcontentobject_version_status' => 1, + 'ezcontentobject_version_language_mask' => 3, + 'ezcontentobject_version_initial_language_id' => 2, + 'ezcontentobject_attribute_id' => 4000, + 'ezcontentobject_attribute_contentclassattribute_id' => 193, + 'ezcontentobject_attribute_data_type_string' => 'ezkeyword', + 'ezcontentobject_attribute_language_code' => 'eng-GB', + 'ezcontentobject_attribute_language_id' => 4, + 'ezcontentobject_attribute_data_float' => 0.0, + 'ezcontentobject_attribute_data_int' => null, + 'ezcontentobject_attribute_data_text' => '', + 'ezcontentobject_attribute_sort_key_int' => 0, + 'ezcontentobject_attribute_sort_key_string' => '', + 'ezcontentobject_tree_main_node_id' => 228, + 'ezcontentobject_is_hidden' => 0, + ], +]; \ No newline at end of file diff --git a/eZ/Publish/Core/Persistence/Legacy/Tests/Content/_fixtures/extract_content_from_rows_result.php b/eZ/Publish/Core/Persistence/Legacy/Tests/Content/_fixtures/extract_content_from_rows_result.php index d1859864e2..0bfc326130 100644 --- a/eZ/Publish/Core/Persistence/Legacy/Tests/Content/_fixtures/extract_content_from_rows_result.php +++ b/eZ/Publish/Core/Persistence/Legacy/Tests/Content/_fixtures/extract_content_from_rows_result.php @@ -39,16 +39,6 @@ $content->versionInfo = $versionInfo; -$field = new Field(); -$field->id = 4000; -$field->fieldDefinitionId = 193; -$field->type = 'ezkeyword'; -$field->value = new FieldValue(); -$field->languageCode = 'eng-GB'; -$field->versionNo = 2; - -$content->fields[] = $field; - $field = new Field(); $field->id = 1332; $field->fieldDefinitionId = 183; @@ -129,4 +119,14 @@ $content->fields[] = $field; +$field = new Field(); +$field->id = 4000; +$field->fieldDefinitionId = 193; +$field->type = 'ezkeyword'; +$field->value = new FieldValue(); +$field->languageCode = 'eng-GB'; +$field->versionNo = 2; + +$content->fields[] = $field; + return $content; diff --git a/eZ/Publish/SPI/Tests/FieldType/BaseIntegrationTest.php b/eZ/Publish/SPI/Tests/FieldType/BaseIntegrationTest.php index c0ca560020..396d0be03c 100644 --- a/eZ/Publish/SPI/Tests/FieldType/BaseIntegrationTest.php +++ b/eZ/Publish/SPI/Tests/FieldType/BaseIntegrationTest.php @@ -445,10 +445,10 @@ public function testLoadFieldType($content) { $this->assertSame( $this->getTypeName(), - $content->fields[1]->type + $content->fields[2]->type ); - return $content->fields[1]; + return $content->fields[2]; } /** @@ -506,10 +506,10 @@ public function testUpdateFieldType($content) { $this->assertSame( $this->getTypeName(), - $content->fields[1]->type + $content->fields[2]->type ); - return $content->fields[1]; + return $content->fields[2]; } /**