Skip to content

Commit

Permalink
tests: removed useless usage of deprecated Route::addStyle
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Nov 5, 2014
1 parent c0d9eec commit b9d567a
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 25 deletions.
17 changes: 9 additions & 8 deletions tests/Application.Routers/Route.filterTable.query.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,17 @@ require __DIR__ . '/../bootstrap.php';
require __DIR__ . '/Route.inc';


Route::addStyle('#xlat', 'presenter');
Route::setStyleProperty('#xlat', Route::FILTER_TABLE, array(
'produkt' => 'Product',
'kategorie' => 'Category',
'zakaznik' => 'Customer',
'kosik' => 'Basket',
$route = new Route(' ? action=<presenter>', array(
'presenter' => array(
Route::FILTER_TABLE => array(
'produkt' => 'Product',
'kategorie' => 'Category',
'zakaznik' => 'Customer',
'kosik' => 'Basket',
),
),
));

$route = new Route(' ? action=<presenter #xlat>', array());

testRouteIn($route, '/?action=kategorie', 'Category', array(
'test' => 'testvalue',
), '/?test=testvalue&action=kategorie');
19 changes: 10 additions & 9 deletions tests/Application.Routers/Route.filterTable.strict.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,17 @@ require __DIR__ . '/../bootstrap.php';
require __DIR__ . '/Route.inc';


Route::addStyle('#xlat', 'presenter');
Route::setStyleProperty('#xlat', Route::FILTER_TABLE, array(
'produkt' => 'Product',
'kategorie' => 'Category',
'zakaznik' => 'Customer',
'kosik' => 'Basket',
$route = new Route('<presenter>', array(
'presenter' => array(
Route::FILTER_TABLE => array(
'produkt' => 'Product',
'kategorie' => 'Category',
'zakaznik' => 'Customer',
'kosik' => 'Basket',
),
Route::FILTER_STRICT => TRUE,
),
));
Route::setStyleProperty('#xlat', Route::FILTER_STRICT, TRUE);

$route = new Route('<presenter #xlat>', array());

testRouteIn($route, '/kategorie/', 'Category', array(
'test' => 'testvalue',
Expand Down
17 changes: 9 additions & 8 deletions tests/Application.Routers/Route.filterTable.url.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,17 @@ require __DIR__ . '/../bootstrap.php';
require __DIR__ . '/Route.inc';


Route::addStyle('#xlat', 'presenter');
Route::setStyleProperty('#xlat', Route::FILTER_TABLE, array(
'produkt' => 'Product',
'kategorie' => 'Category',
'zakaznik' => 'Customer',
'kosik' => 'Basket',
$route = new Route('<presenter>', array(
'presenter' => array(
Route::FILTER_TABLE => array(
'produkt' => 'Product',
'kategorie' => 'Category',
'zakaznik' => 'Customer',
'kosik' => 'Basket',
),
),
));

$route = new Route('<presenter #xlat>', array());

testRouteIn($route, '/kategorie/', 'Category', array(
'test' => 'testvalue',
), '/kategorie?test=testvalue');
Expand Down

0 comments on commit b9d567a

Please sign in to comment.