@@ -553,37 +553,30 @@ public function it_gets_the_graphql_type_of_string_by_default()
553553 #[Test]
554554 public function it_can_make_a_fieldtype_selectable_in_forms ()
555555 {
556- $ fieldtype = new class extends Fieldtype
557- {
558- public static $ handle = 'test-selectable ' ;
559- protected $ selectableInForms = false ;
560- };
556+ $ fieldtype = FieldtypeRepository::find ('textarea ' );
561557
562558 $ this ->assertFalse ($ fieldtype ->selectableInForms ());
563559
564560 $ fieldtype ::makeSelectableInForms ();
565561
566562 $ this ->assertTrue ($ fieldtype ->selectableInForms ());
567- $ this ->assertTrue (FieldtypeRepository::hasBeenMadeSelectableInForms ('test-selectable ' ));
568- $ this ->assertTrue (FieldtypeRepository::selectableInFormIsOverriden ('test-selectable ' ));
563+ $ this ->assertTrue (FieldtypeRepository::hasBeenMadeSelectableInForms ('textarea ' ));
564+ $ this ->assertTrue (FieldtypeRepository::selectableInFormIsOverriden ('textarea ' ));
569565 }
570566
571567 #[Test]
572568 public function it_can_make_a_fieldtype_unselectable_in_forms ()
573569 {
574- $ fieldtype = new class extends Fieldtype
575- {
576- public static $ handle = 'test-unselectable ' ;
577- protected $ selectableInForms = true ;
578- };
570+ $ fieldtype = FieldtypeRepository::find ('text ' );
579571
572+ $ fieldtype ::makeSelectableInForms ();
580573 $ this ->assertTrue ($ fieldtype ->selectableInForms ());
581574
582575 $ fieldtype ::makeUnselectableInForms ();
583576
584577 $ this ->assertFalse ($ fieldtype ->selectableInForms ());
585- $ this ->assertFalse (FieldtypeRepository::hasBeenMadeSelectableInForms ('test-unselectable ' ));
586- $ this ->assertTrue (FieldtypeRepository::selectableInFormIsOverriden ('test-unselectable ' ));
578+ $ this ->assertFalse (FieldtypeRepository::hasBeenMadeSelectableInForms ('text ' ));
579+ $ this ->assertTrue (FieldtypeRepository::selectableInFormIsOverriden ('text ' ));
587580 }
588581}
589582
0 commit comments