Skip to content

Commit b9d567a

Browse files
committed
tests: removed useless usage of deprecated Route::addStyle
1 parent c0d9eec commit b9d567a

3 files changed

Lines changed: 28 additions & 25 deletions

File tree

tests/Application.Routers/Route.filterTable.query.phpt

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,17 @@ require __DIR__ . '/../bootstrap.php';
1313
require __DIR__ . '/Route.inc';
1414

1515

16-
Route::addStyle('#xlat', 'presenter');
17-
Route::setStyleProperty('#xlat', Route::FILTER_TABLE, array(
18-
'produkt' => 'Product',
19-
'kategorie' => 'Category',
20-
'zakaznik' => 'Customer',
21-
'kosik' => 'Basket',
16+
$route = new Route(' ? action=<presenter>', array(
17+
'presenter' => array(
18+
Route::FILTER_TABLE => array(
19+
'produkt' => 'Product',
20+
'kategorie' => 'Category',
21+
'zakaznik' => 'Customer',
22+
'kosik' => 'Basket',
23+
),
24+
),
2225
));
2326

24-
$route = new Route(' ? action=<presenter #xlat>', array());
25-
2627
testRouteIn($route, '/?action=kategorie', 'Category', array(
2728
'test' => 'testvalue',
2829
), '/?test=testvalue&action=kategorie');

tests/Application.Routers/Route.filterTable.strict.phpt

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,17 @@ require __DIR__ . '/../bootstrap.php';
1313
require __DIR__ . '/Route.inc';
1414

1515

16-
Route::addStyle('#xlat', 'presenter');
17-
Route::setStyleProperty('#xlat', Route::FILTER_TABLE, array(
18-
'produkt' => 'Product',
19-
'kategorie' => 'Category',
20-
'zakaznik' => 'Customer',
21-
'kosik' => 'Basket',
16+
$route = new Route('<presenter>', array(
17+
'presenter' => array(
18+
Route::FILTER_TABLE => array(
19+
'produkt' => 'Product',
20+
'kategorie' => 'Category',
21+
'zakaznik' => 'Customer',
22+
'kosik' => 'Basket',
23+
),
24+
Route::FILTER_STRICT => TRUE,
25+
),
2226
));
23-
Route::setStyleProperty('#xlat', Route::FILTER_STRICT, TRUE);
24-
25-
$route = new Route('<presenter #xlat>', array());
2627

2728
testRouteIn($route, '/kategorie/', 'Category', array(
2829
'test' => 'testvalue',

tests/Application.Routers/Route.filterTable.url.phpt

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,17 @@ require __DIR__ . '/../bootstrap.php';
1313
require __DIR__ . '/Route.inc';
1414

1515

16-
Route::addStyle('#xlat', 'presenter');
17-
Route::setStyleProperty('#xlat', Route::FILTER_TABLE, array(
18-
'produkt' => 'Product',
19-
'kategorie' => 'Category',
20-
'zakaznik' => 'Customer',
21-
'kosik' => 'Basket',
16+
$route = new Route('<presenter>', array(
17+
'presenter' => array(
18+
Route::FILTER_TABLE => array(
19+
'produkt' => 'Product',
20+
'kategorie' => 'Category',
21+
'zakaznik' => 'Customer',
22+
'kosik' => 'Basket',
23+
),
24+
),
2225
));
2326

24-
$route = new Route('<presenter #xlat>', array());
25-
2627
testRouteIn($route, '/kategorie/', 'Category', array(
2728
'test' => 'testvalue',
2829
), '/kategorie?test=testvalue');

0 commit comments

Comments
 (0)