@@ 54-64 (lines=11) @@ | ||
51 | $this->assertEquals('/nl/some-uri', $url); |
|
52 | } |
|
53 | ||
54 | public function testMatchWithNodeTranslation() |
|
55 | { |
|
56 | $request = $this->getRequest(); |
|
57 | $nodeTranslation = new NodeTranslation(); |
|
58 | $container = $this->getContainer($request, $nodeTranslation); |
|
59 | $object = new DomainBasedLocaleRouter($container); |
|
60 | $result = $object->match('/en/some-uri'); |
|
61 | $this->assertEquals('some-uri', $result['url']); |
|
62 | $this->assertEquals('en_GB', $result['_locale']); |
|
63 | $this->assertEquals($nodeTranslation, $result['_nodeTranslation']); |
|
64 | } |
|
65 | ||
66 | public function testMatchWithoutNodeTranslation() |
|
67 | { |
@@ 47-57 (lines=11) @@ | ||
44 | $this->assertEquals($context, $object->getContext()); |
|
45 | } |
|
46 | ||
47 | public function testMatchWithNodeTranslation() |
|
48 | { |
|
49 | $request = $this->getRequest(); |
|
50 | $nodeTranslation = new NodeTranslation(); |
|
51 | $container = $this->getContainer($request, true, $nodeTranslation); |
|
52 | $object = new SlugRouter($container); |
|
53 | $result = $object->match('/en/some-uri'); |
|
54 | $this->assertEquals('some-uri', $result['url']); |
|
55 | $this->assertEquals('en', $result['_locale']); |
|
56 | $this->assertEquals($nodeTranslation, $result['_nodeTranslation']); |
|
57 | } |
|
58 | ||
59 | public function testMatchWithoutNodeTranslation() |
|
60 | { |