Skip to content

Commit

Permalink
Removing unnecessary code from EntityRouteTest
Browse files Browse the repository at this point in the history
  • Loading branch information
burzum committed Oct 17, 2017
1 parent c625d44 commit 6d10b17
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions tests/TestCase/Routing/Route/EntityRouteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,12 @@ public function testMatchEntityObject()
'/articles/:category_id/:slug',
[
'_name' => 'articlesView',
'_entity' => $entity,
'controller' => 'articles',
'action' => 'view'
]
);

$result = $route->match([
'_entity' => $entity,
'_name' => 'articlesView',
'controller' => 'articles',
'action' => 'view'
'_name' => 'articlesView'
]);

$this->assertEquals('/articles/2/article-slug', $result);
Expand All @@ -71,18 +66,14 @@ public function testMatchingArray()
'/articles/:category_id/:slug',
[
'_name' => 'articlesView',
'_entity' => $entity,
'controller' => 'articles',
'action' => 'view'
'_entity' => $entity
]
);

$result = $route->match([
'_entity' => $entity,
'_name' => 'articlesView',
'controller' => 'articles',
'action' => 'view'
]);
'_name' => 'articlesView'
]);

$this->assertEquals('/articles/2/article-slug', $result);
}
Expand All @@ -96,13 +87,11 @@ public function testMatchingArray()
public function testInvalidEntityValueException()
{
$route = new EntityRoute('/', [
'_name' => 'articlesView',
'_entity' => 'Something else'
]);

$route->match([
'_entity' => 'something-else',
'_name' => 'articlesView'
]);
}
}

0 comments on commit 6d10b17

Please sign in to comment.