77use DateTime ;
88use Ibexa \Contracts \Core \Repository \Values \Content \Content ;
99use Ibexa \Contracts \Core \Repository \Values \ContentType \ContentType ;
10- use Ibexa \Tests \Integration \Core \Repository \BaseTest as APIBaseTest ;
10+ use Ibexa \Tests \Integration \Core \Repository \BaseTestCase as APIBaseTest ;
1111use Netgen \Bundle \IbexaScheduledVisibilityBundle \Core \ScheduledVisibilityService ;
1212
1313abstract class BaseTest extends APIBaseTest
@@ -25,42 +25,42 @@ public static function provideCases(): iterable
2525 [
2626 [
2727 'publish_from ' => null ,
28- 'publish_to ' => new DateTime ('tomorrow ' ),
28+ 'publish_to ' => new DateTime ('tomorrow ' , new \ DateTimeZone ( ' UTC ' ) ),
2929 ],
3030 false ,
3131 ],
3232 [
3333 [
3434 'publish_from ' => null ,
35- 'publish_to ' => new DateTime ('yesterday ' ),
35+ 'publish_to ' => new DateTime ('yesterday ' , new \ DateTimeZone ( ' UTC ' ) ),
3636 ],
3737 true ,
3838 ],
3939 [
4040 [
41- 'publish_from ' => new DateTime ('2 days ago ' ),
42- 'publish_to ' => new DateTime ('yesterday ' ),
41+ 'publish_from ' => new DateTime ('2 days ago ' , new \ DateTimeZone ( ' UTC ' ) ),
42+ 'publish_to ' => new DateTime ('yesterday ' , new \ DateTimeZone ( ' UTC ' ) ),
4343 ],
4444 true ,
4545 ],
4646 [
4747 [
48- 'publish_from ' => new DateTime ('yesterday ' ),
49- 'publish_to ' => new DateTime ('tomorrow ' ),
48+ 'publish_from ' => new DateTime ('yesterday ' , new \ DateTimeZone ( ' UTC ' ) ),
49+ 'publish_to ' => new DateTime ('tomorrow ' , new \ DateTimeZone ( ' UTC ' ) ),
5050 ],
5151 false ,
5252 ],
5353 [
5454 [
55- 'publish_from ' => new DateTime ('tomorrow ' ),
55+ 'publish_from ' => new DateTime ('tomorrow ' , new \ DateTimeZone ( ' UTC ' ) ),
5656 'publish_to ' => null ,
5757 ],
5858 true ,
5959 ],
6060 [
6161 [
62- 'publish_from ' => new DateTime ('tomorrow ' ),
63- 'publish_to ' => new DateTime ('2 day ' ),
62+ 'publish_from ' => new DateTime ('tomorrow ' , new \ DateTimeZone ( ' UTC ' ) ),
63+ 'publish_to ' => new DateTime ('2 day ' , new \ DateTimeZone ( ' UTC ' ) ),
6464 ],
6565 true ,
6666 ],
@@ -93,14 +93,14 @@ protected function createContentType(): ContentType
9393 $ typeCreate ->creatorId = $ this ->generateId ('user ' , $ permissionResolver ->getCurrentUserReference ()->getUserId ());
9494 $ typeCreate ->creationDate = $ this ->createDateTime ();
9595
96- $ publishFromFieldCreate = $ contentTypeService ->newFieldDefinitionCreateStruct ('publish_from ' , 'ezdate ' );
96+ $ publishFromFieldCreate = $ contentTypeService ->newFieldDefinitionCreateStruct ('publish_from ' , 'ibexa_date ' );
9797 $ publishFromFieldCreate ->names = [
9898 'eng-GB ' => 'Publish from ' ,
9999 ];
100100 $ publishFromFieldCreate ->position = 1 ;
101101 $ typeCreate ->addFieldDefinition ($ publishFromFieldCreate );
102102
103- $ publishToFieldCreate = $ contentTypeService ->newFieldDefinitionCreateStruct ('publish_to ' , 'ezdatetime ' );
103+ $ publishToFieldCreate = $ contentTypeService ->newFieldDefinitionCreateStruct ('publish_to ' , 'ibexa_datetime ' );
104104 $ publishToFieldCreate ->names = [
105105 'eng-GB ' => 'Publish to ' ,
106106 ];
0 commit comments