17 lines
499 B
PHP
17 lines
499 B
PHP
<?php
|
|
|
|
use classes\router;
|
|
|
|
it('matches dynamic route parameter names containing underscores', function (): void {
|
|
$_SERVER['REQUEST_URI'] = '/modules/self-serve/lane/hardware/batch/916cdba1981e52f3dc728ea06fc39cf0';
|
|
$_SERVER['REQUEST_METHOD'] = 'GET';
|
|
|
|
$router = new router();
|
|
$matcher = new ReflectionMethod(router::class, 'doesRouteMatchCurrent');
|
|
|
|
expect($matcher->invoke(
|
|
$router,
|
|
'/modules/self-serve/lane/hardware/batch/{batch_id}'
|
|
))->toBeTrue();
|
|
});
|