File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,15 @@ public function allowClear(bool $state = true): static
18
18
return $ this ->opts (['allowClear ' => $ state ]);
19
19
}
20
20
21
+ /**
22
+ * @param string $value
23
+ * @return $this
24
+ */
25
+ public function placeholder (string $ value ): static
26
+ {
27
+ return $ this ->optsPlaceholder ($ value );
28
+ }
29
+
21
30
/**
22
31
* @param string $text
23
32
* @param string $id
Original file line number Diff line number Diff line change @@ -196,6 +196,9 @@ public function it_can_create_select2_field()
196
196
$ field ->processPaginatedResults ('username ' , 'user_id ' );
197
197
$ this ->assertStringContainsString ('e.text = e.username ' , $ field ->opts ['ajax ' ]['processResults ' ]);
198
198
$ this ->assertStringContainsString ('e.id = e.user_id ' , $ field ->opts ['ajax ' ]['processResults ' ]);
199
+
200
+ $ field ->placeholder ('New Placeholder ' );
201
+ $ this ->assertEquals ('New Placeholder ' , $ field ->opts ['placeholder ' ]['text ' ]);
199
202
}
200
203
201
204
/** @test */
You can’t perform that action at this time.
0 commit comments