|
|
|
@ -97,6 +97,10 @@ class UrlManagerCreateUrlTest extends TestCase
|
|
|
|
|
* without rules. |
|
|
|
|
* |
|
|
|
|
* @dataProvider variationsProvider |
|
|
|
|
* @param string $method |
|
|
|
|
* @param bool $showScriptName |
|
|
|
|
* @param string $prefix |
|
|
|
|
* @param array $config |
|
|
|
|
*/ |
|
|
|
|
public function testWithoutRules($method, $showScriptName, $prefix, $config) |
|
|
|
|
{ |
|
|
|
@ -128,6 +132,10 @@ class UrlManagerCreateUrlTest extends TestCase
|
|
|
|
|
* With UrlManager::$suffix |
|
|
|
|
* |
|
|
|
|
* @dataProvider variationsProvider |
|
|
|
|
* @param string $method |
|
|
|
|
* @param bool $showScriptName |
|
|
|
|
* @param string $prefix |
|
|
|
|
* @param array $config |
|
|
|
|
*/ |
|
|
|
|
public function testWithoutRulesWithSuffix($method, $showScriptName, $prefix, $config) |
|
|
|
|
{ |
|
|
|
@ -182,6 +190,10 @@ class UrlManagerCreateUrlTest extends TestCase
|
|
|
|
|
* with simple rules. |
|
|
|
|
* |
|
|
|
|
* @dataProvider variationsProvider |
|
|
|
|
* @param string $method |
|
|
|
|
* @param bool $showScriptName |
|
|
|
|
* @param string $prefix |
|
|
|
|
* @param array $config |
|
|
|
|
*/ |
|
|
|
|
public function testSimpleRules($method, $showScriptName, $prefix, $config) |
|
|
|
|
{ |
|
|
|
@ -231,6 +243,10 @@ class UrlManagerCreateUrlTest extends TestCase
|
|
|
|
|
* With UrlManager::$suffix |
|
|
|
|
* |
|
|
|
|
* @dataProvider variationsProvider |
|
|
|
|
* @param string $method |
|
|
|
|
* @param bool $showScriptName |
|
|
|
|
* @param string $prefix |
|
|
|
|
* @param array $config |
|
|
|
|
*/ |
|
|
|
|
public function testSimpleRulesWithSuffix($method, $showScriptName, $prefix, $config) |
|
|
|
|
{ |
|
|
|
@ -280,6 +296,10 @@ class UrlManagerCreateUrlTest extends TestCase
|
|
|
|
|
* with rules that have varadic controller/actions. |
|
|
|
|
* |
|
|
|
|
* @dataProvider variationsProvider |
|
|
|
|
* @param string $method |
|
|
|
|
* @param bool $showScriptName |
|
|
|
|
* @param string $prefix |
|
|
|
|
* @param array $config |
|
|
|
|
*/ |
|
|
|
|
public function testControllerActionParams($method, $showScriptName, $prefix, $config) |
|
|
|
|
{ |
|
|
|
@ -327,6 +347,10 @@ class UrlManagerCreateUrlTest extends TestCase
|
|
|
|
|
* with rules that have default values for parameters. |
|
|
|
|
* |
|
|
|
|
* @dataProvider variationsProvider |
|
|
|
|
* @param string $method |
|
|
|
|
* @param bool $showScriptName |
|
|
|
|
* @param string $prefix |
|
|
|
|
* @param array $config |
|
|
|
|
*/ |
|
|
|
|
public function testRulesWithDefaultParams($method, $showScriptName, $prefix, $config) |
|
|
|
|
{ |
|
|
|
@ -401,6 +425,10 @@ class UrlManagerCreateUrlTest extends TestCase
|
|
|
|
|
* |
|
|
|
|
* @dataProvider variationsProvider |
|
|
|
|
* @see https://github.com/yiisoft/yii2/issues/10935 |
|
|
|
|
* @param string $method |
|
|
|
|
* @param bool $showScriptName |
|
|
|
|
* @param string $prefix |
|
|
|
|
* @param array $config |
|
|
|
|
*/ |
|
|
|
|
public function testWithNullParams($method, $showScriptName, $prefix, $config) |
|
|
|
|
{ |
|
|
|
@ -437,6 +465,10 @@ class UrlManagerCreateUrlTest extends TestCase
|
|
|
|
|
* |
|
|
|
|
* @dataProvider variationsProvider |
|
|
|
|
* @see https://github.com/yiisoft/yii2/issues/6717 |
|
|
|
|
* @param string $method |
|
|
|
|
* @param bool $showScriptName |
|
|
|
|
* @param string $prefix |
|
|
|
|
* @param array $config |
|
|
|
|
*/ |
|
|
|
|
public function testWithEmptyPattern($method, $showScriptName, $prefix, $config) |
|
|
|
|
{ |
|
|
|
@ -505,6 +537,9 @@ class UrlManagerCreateUrlTest extends TestCase
|
|
|
|
|
/** |
|
|
|
|
* Test rules that have host info in the patterns. |
|
|
|
|
* @dataProvider absolutePatternsVariations |
|
|
|
|
* @param bool $showScriptName |
|
|
|
|
* @param string $prefix |
|
|
|
|
* @param array $config |
|
|
|
|
*/ |
|
|
|
|
public function testAbsolutePatterns($showScriptName, $prefix, $config) |
|
|
|
|
{ |
|
|
|
@ -563,6 +598,9 @@ class UrlManagerCreateUrlTest extends TestCase
|
|
|
|
|
* Test rules that have host info in the patterns, that are protocol relative. |
|
|
|
|
* @dataProvider absolutePatternsVariations |
|
|
|
|
* @see https://github.com/yiisoft/yii2/issues/12691 |
|
|
|
|
* @param bool $showScriptName |
|
|
|
|
* @param string $prefix |
|
|
|
|
* @param array $config |
|
|
|
|
*/ |
|
|
|
|
public function testProtocolRelativeAbsolutePattern($showScriptName, $prefix, $config) |
|
|
|
|
{ |
|
|
|
@ -654,6 +692,7 @@ class UrlManagerCreateUrlTest extends TestCase
|
|
|
|
|
* |
|
|
|
|
* @dataProvider multipleHostsRulesDataProvider |
|
|
|
|
* @see https://github.com/yiisoft/yii2/issues/7948 |
|
|
|
|
* @param string $host |
|
|
|
|
*/ |
|
|
|
|
public function testMultipleHostsRules($host) |
|
|
|
|
{ |
|
|
|
|