octicon-git-branch(16/) Commit Graph

38 Commits

Author SHA1 Message Date
Robert Korulczyk
5b2101f14c Update guide: Object -> BaseObject
issue #7936
2017-07-19 10:51:46 +02:00 octicon-file-diff(16/) octicon-file-code(16/)
Robert Korulczyk
4dbcc78559 Update runtime-routing.md 2017-04-26 11:41:07 +02:00 octicon-file-diff(16/) octicon-file-code(16/)
Alexander Makarov
1bf2f160d0 param → parameter [skip ci] 2017-04-26 12:08:57 +03:00 octicon-file-diff(16/) octicon-file-code(16/)
Robert Korulczyk
e448ed7444 Update docs 2017-03-01 12:22:53 +01:00 octicon-file-diff(16/) octicon-file-code(16/)
Carsten Brandt
7e8d9c5c5f added note about protocol relative URL pattern to the guide 2017-02-08 12:28:07 +01:00 octicon-file-diff(16/) octicon-file-code(16/)
Carsten Brandt
8faedcbd7c Refactored UrlManagerTest to cover more use cases
UrlManager is a complex class with a large bunch of options that needs
to be tested
and we had a few regressions in the past even though there are already a
lot of tests
covering it. Test coverage measured by lines does not help us determine
how good it is tested,
we need test coverage for every major path through the code.

I have refactored the UrlManager tests to reflect the different options
and cases to
have a better overview of which cases are covered and which are not.

UrlManager has two main operation modes:

- "default" url format, which is the simple case. These are covered by
  methods in `UrlManagerTest`.

- "pretty" url format. This is the complex case, which involves UrlRules
  and url parsing.
  I have created two separate classes for this case:
  Url creation for "pretty" url format is covered by
`UrlManagerCreateUrlTest`.
  Url parsing for "pretty" url format is covered by
`UrlManagerParseUrlTest`.

Each of the test classes have a `getUrlManager` method that creates a
UrlManager instance
with a specific configuration and certain variations in options.
It is also tested that options that are not relevant in a certain
operation mode have no effect on the result.

To make sure to not remove tests that have existed before, here is a map
of where code has been moved.
The following test methods existed in the [old test
class](4187718c14/tests/framework/web/UrlManagerTest.php):

- `testCreateUrl()` split between UrlManagerTest and
  UrlManagerCreateUrlTest variations should all be covered by
`variationsProvider()`.
- `testCreateUrlWithNullParams()` covered by UrlManagerCreateUrlTest by
  `testWithNullParams()`
- `testCreateUrlWithEmptyPattern()`
- `testCreateAbsoluteUrl()` covered in UrlManagerCreateUrlTest by new
  tests via `variationsProvider()`.
- `testCreateAbsoluteUrlWithSuffix()` covered in UrlManagerCreateUrlTest
  by `testAbsolutePatterns`.

- `testParseRequest()` covered by UrlManagerParseUrlTest, UrlNormalizer
  related parts moved to UrlNormalizerTest.
- `testParseRESTRequest()` moved to UrlManagerParseUrlTest
- `testHash()` covered in different tests in UrlManagerCreateUrlTest.
- `testMultipleHostsRules($host)` kept as is.

Before:

    $ vendor/bin/phpunit tests/framework/web/UrlManagerTest.php
    ...
    OK (12 tests, 89 assertions)

After:

    $ vendor/bin/phpunit tests/framework/web/UrlManager*.php
    ...
    OK (72 tests, 648 assertions)
2017-01-31 02:38:35 +01:00 octicon-file-diff(16/) octicon-file-code(16/)
Carsten Brandt
1e513a91d1 edited guide runtime-routing 2017-01-03 14:24:34 +01:00 octicon-file-diff(16/) octicon-file-code(16/)
SilverFire - Dmitry Naumenko
685f16e8ef 📖 Updated guide pages - wrap true, false, null 2016-09-20 10:49:15 +03:00 octicon-file-diff(16/) octicon-file-code(16/)
Carsten Brandt
ee8a8e90f8 update urlnormalizer docs 2016-09-15 14:52:32 +02:00 octicon-file-diff(16/) octicon-file-code(16/)
Klimov Paul
34aeb019e5 Docs fix 2016-09-13 18:04:07 +03:00 octicon-file-diff(16/) octicon-file-code(16/)
Carsten Brandt
997ebbabd5 fixed 'class' in UrlNormalizer config
pr #12417
2016-09-01 10:20:07 +02:00 octicon-file-diff(16/) octicon-file-code(16/)
Robert Korulczyk
6a9e9df8d6 Fix phpdoc for UrlNormalizer [skip ci] (#12417) 2016-08-31 23:16:49 +03:00 octicon-file-diff(16/) octicon-file-code(16/)
Robert Korulczyk
8142de23d4 Improve normalizer for URL manager 2016-08-30 21:25:23 +02:00 octicon-file-diff(16/) octicon-file-code(16/)
Roman Grinyov
90994cab87 Inline lists to Normal lists 2016-08-30 02:00:59 +03:00 octicon-file-diff(16/) octicon-file-code(16/)
Nobuo Kihara
785bc0247d docs/guide/runtime-routing.md typo fixed [ci skip] 2016-08-26 11:39:41 +09:00 octicon-file-diff(16/) octicon-file-code(16/)
Carsten Brandt
b2e0d70535 add paragraph about default route and default action to guide
fix #8255
2016-08-19 10:44:23 +02:00 octicon-file-diff(16/) octicon-file-code(16/)
muhammadcahya
6f7f9ea4e5 Updated docs/guide 2016-04-20 12:36:50 +03:00 octicon-file-diff(16/) octicon-file-code(16/)
Alexander Makarov
d3b5f4a284 Fixes #3656: Encode / in "r" query parameter in docs as it really is 2016-03-15 21:52:41 +03:00 octicon-file-diff(16/) octicon-file-code(16/)
Carsten Brandt
7d23e39c1e added note about routing naming convention to upgrade guide
also added some links to controller ID and action ID description.

fixes #5029
2015-05-24 20:44:33 +02:00 octicon-file-diff(16/) octicon-file-code(16/)
Carsten Brandt
739cde461a added some references to the guide 2015-04-19 19:35:02 +02:00 octicon-file-diff(16/) octicon-file-code(16/)
Carsten Brandt
89febd64f0 guide: enable strict parsing to false
this is a better default which can be copy pasted from the guide as it works out of the box with no rules
2015-03-05 23:14:27 +01:00 octicon-file-diff(16/) octicon-file-code(16/)
Qiang Xue
6327262f49 Merge pull request #7533 from apyii/patch-2
Update runtime-routing.md
2015-03-02 19:16:28 -05:00 octicon-file-diff(16/) octicon-file-code(16/)
Andrew Potter
9229f66174 Update runtime-routing.md 2015-03-02 22:20:47 +01:00 octicon-file-diff(16/) octicon-file-code(16/)
Andrew Potter
b15baa09ff Update runtime-routing.md 2015-03-02 21:23:21 +01:00 octicon-file-diff(16/) octicon-file-code(16/)
Carsten Brandt
dee62967e0 adjusted url guide to match change in #7025 2015-01-26 13:31:13 +01:00 octicon-file-diff(16/) octicon-file-code(16/)
Ivan Pushkin
6940aecd04 Update runtime-routing.md: Fix url rule order
in previous example this
Url::to(['post/index', 'year' => 2014, 'category' => 'php']) 
will not create `/index.php/posts/2014/php` 
because it will be handled by first find rule 'posts' => 'post/index' and url will be '/index.php/posts?year=2014&category=php'
2015-01-26 14:22:15 +02:00 octicon-file-diff(16/) octicon-file-code(16/)
Carsten Brandt
36bebbfefb use id instead of name for anchor references in the guide
fixes #7013
2015-01-25 22:13:16 +01:00 octicon-file-diff(16/) octicon-file-code(16/)
Qiang Xue
201043244d doc fixes [skip ci] 2015-01-10 23:23:36 -05:00 octicon-file-diff(16/) octicon-file-code(16/)
Nobuo Kihara
e71112bb90 docs/guide/runtime-routing.md - fix [ci skip] 2014-12-02 08:04:51 +09:00 octicon-file-diff(16/) octicon-file-code(16/)
larnu
f15eeb09b6 Update runtime-routing.md
Shouldn't showScriptName be false to hide entry script name?
2014-11-27 20:40:14 +01:00 octicon-file-diff(16/) octicon-file-code(16/)
surgat
08e65958dd Update runtime-routing.md 2014-11-25 15:53:06 +03:00 octicon-file-diff(16/) octicon-file-code(16/)
Christopher Vrooman
b5b7e75c4c Update runtime-routing.md
Minor syntax changes.
2014-11-20 14:58:04 -03:00 octicon-file-diff(16/) octicon-file-code(16/)
Nobuo Kihara
df785fc27c docs/guide/runtime-routing.md - grammar fix [ci skip] 2014-11-19 23:55:45 +09:00 octicon-file-diff(16/) octicon-file-code(16/)
Nobuo Kihara
04341e5086 docs/guide/runtime-routing.md - grammar correction [ci skip] 2014-11-19 23:55:44 +09:00 octicon-file-diff(16/) octicon-file-code(16/)
Qiang Xue
ee3fa07f96 typo fix [skip ci] 2014-11-03 20:51:36 -05:00 octicon-file-diff(16/) octicon-file-code(16/)
Qiang Xue
b10f580dfd Finished routing tutorial [skip ci] 2014-11-03 17:03:44 -05:00 octicon-file-diff(16/) octicon-file-code(16/)
Qiang Xue
0b755395d4 working on guide [skip ci] 2014-11-02 22:11:45 -05:00 octicon-file-diff(16/) octicon-file-code(16/)
Qiang Xue
1cd05b4636 finished routing tutoail [skip ci] 2014-09-28 18:57:17 -04:00 octicon-file-diff(16/) octicon-file-code(16/)