Skip to content

Commit

Permalink
Move tests around.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Jan 8, 2017
1 parent 3961795 commit b985968
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions tests/TestCase/Routing/RouteCollectionTest.php
Expand Up @@ -200,20 +200,6 @@ public function testParseRequest()
];
$this->assertEquals($expected, $result);

$request = new ServerRequest(['url' => '/b/the-thing?one=two']);
$result = $this->collection->parseRequest($request);
$expected = [
'controller' => 'Articles',
'action' => 'view',
'id' => 'the-thing',
'pass' => [],
'plugin' => null,
'key' => 'value',
'?' => ['one' => 'two'],
'_matchedRoute' => '/b/:id',
];
$this->assertEquals($expected, $result);

$request = new ServerRequest(['url' => '/b/media/search']);
$result = $this->collection->parseRequest($request);
$expected = [
Expand All @@ -237,6 +223,21 @@ public function testParseRequest()
'_matchedRoute' => '/b/media/search/*',
];
$this->assertEquals($expected, $result);

$request = new ServerRequest(['url' => '/b/the-thing?one=two']);
$result = $this->collection->parseRequest($request);
$expected = [
'controller' => 'Articles',
'action' => 'view',
'id' => 'the-thing',
'pass' => [],
'plugin' => null,
'key' => 'value',
'?' => ['one' => 'two'],
'_matchedRoute' => '/b/:id',
];
$this->assertEquals($expected, $result);

}

/**
Expand Down

0 comments on commit b985968

Please sign in to comment.