File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111
1212class Options implements \Stringable
1313{
14- /**
15- * @var string
16- */
17- public const ORIGIN = 'o ' ;
18-
1914 /**
2015 * @var string
2116 */
@@ -212,26 +207,6 @@ public function toString(): string
212207 return implode ($ this ->optionSeparator , $ options );
213208 }
214209
215- /**
216- * Set origin
217- */
218- public function setOrigin (string $ origin ): self
219- {
220- $ this ->options [self ::ORIGIN ] = $ origin ;
221- return $ this ;
222- }
223-
224- /**
225- * Get origin
226- */
227- public function getOrigin (): null |string
228- {
229- /** @var null|string $value */
230- $ value = $ this ->options [self ::ORIGIN ] ?? null ;
231-
232- return $ value ;
233- }
234-
235210 /**
236211 * Set orientation
237212 *
Original file line number Diff line number Diff line change 256256
257257test ('generates signature with unicode characters ' , function (): void {
258258 $ options = createOptions ()
259- ->setOrigin ('main ' )
260259 ->setFormat ('avif ' )
261260 ->setQuality (90 )
262261 ->setWidth (600 )
268267 $ builder = new UrlBuilder ('https://images.example.com ' , $ secret );
269268 $ url = $ builder ->buildUrl ('images/unicode-%E9%BD%90%E8%89%B2-0.png ' , $ options );
270269
271- expect ($ url )->toBe ('https://images.example.com/images/unicode-%E9%BD%90%E8%89%B2-0.png?fit=contain&fm=avif&h=600&o=main& q=90&w=600&s=T708sCDhGXdolPJellqE6HR4K510i0XY5pXq4KZtVc ' );
270+ expect ($ url )->toBe ('https://images.example.com/images/unicode-%E9%BD%90%E8%89%B2-0.png?fit=contain&fm=avif&h=600&q=90&w=600&s=QdTpLQU32MvZqPpWTHupc6foZ3EHeVCLf2R1y6RW3U ' );
272271});
You can’t perform that action at this time.
0 commit comments