@@ -111,18 +111,38 @@ public function it_provides_as_scope_to_get_all_models_that_have_all_of_the_give
111111 }
112112
113113 /** @test */
114- public function it_provides_as_scope_to_get_all_models_that_have_any_of_the_given_tags_with_any_type ()
114+ public function it_provides_a_scope_to_get_all_models_that_have_any_of_the_given_tags_with_any_type ()
115115 {
116116 $ testModels = TestModel::withAnyTagsOfAnyType (['tagE ' , 'tagF ' ])->get ();
117117
118118 $ this ->assertEquals (['model5 ' , 'model6 ' ], $ testModels ->pluck ('name ' )->toArray ());
119119 }
120120
121121 /** @test */
122- public function it_provides_as_scope_to_get_all_models_that_have_all_of_the_given_tags_with_any_type ()
122+ public function it_provides_a_scope_to_get_all_models_that_have_any_of_the_given_tags_with_any_type_from_mixed_tag_values ()
123+ {
124+ $ tagD = Tag::findFromString ('tagD ' );
125+
126+ $ testModels = TestModel::withAnyTagsOfAnyType ([$ tagD , 'tagE ' , 'tagF ' ])->get ();
127+
128+ $ this ->assertEquals (['model4 ' , 'model5 ' , 'model6 ' ], $ testModels ->pluck ('name ' )->toArray ());
129+ }
130+
131+ /** @test */
132+ public function it_provides_a_scope_to_get_all_models_that_have_all_of_the_given_tags_with_any_type ()
123133 {
124134 $ testModels = TestModel::withAllTagsOfAnyType (['tagE ' , 'tagF ' ])->get ();
125135
126136 $ this ->assertEquals (['model5 ' ], $ testModels ->pluck ('name ' )->toArray ());
127137 }
138+
139+ /** @test */
140+ public function it_provides_a_scope_to_get_all_models_that_have_all_of_the_given_tags_with_any_type_from_mixed_tag_values ()
141+ {
142+ $ tagE = Tag::findFromString ('tagE ' , 'typedTag ' );
143+
144+ $ testModels = TestModel::withAllTagsOfAnyType ([$ tagE , 'tagF ' ])->get ();
145+
146+ $ this ->assertEquals (['model5 ' ], $ testModels ->pluck ('name ' )->toArray ());
147+ }
128148}
0 commit comments