mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-02 13:02:24 +08:00
Fix codestyle in build and tests (#20586)
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @link https://www.yiiframework.com/
|
||||
* @copyright Copyright (c) 2008 Yii Software LLC
|
||||
@ -294,8 +295,6 @@ class UrlManagerParseUrlTest extends TestCase
|
||||
|
||||
// TODO implement with hostinfo
|
||||
|
||||
|
||||
|
||||
public function testParseRESTRequest()
|
||||
{
|
||||
$request = new Request();
|
||||
@ -393,7 +392,9 @@ class UrlManagerParseUrlTest extends TestCase
|
||||
$this->assertCount(1, $manager->rules);
|
||||
$firstRule = $manager->rules[0];
|
||||
$this->assertInstanceOf('yii\web\UrlRuleInterface', $firstRule);
|
||||
$this->assertCount(1, $this->getInaccessibleProperty($arrayCache, '_cache'),
|
||||
$this->assertCount(
|
||||
1,
|
||||
$this->getInaccessibleProperty($arrayCache, '_cache'),
|
||||
'Cache contains the only one record that represents initial built rules'
|
||||
);
|
||||
|
||||
@ -405,7 +406,9 @@ class UrlManagerParseUrlTest extends TestCase
|
||||
|
||||
$this->assertCount(4, $manager->rules);
|
||||
$this->assertSame($firstRule, $manager->rules[0]);
|
||||
$this->assertCount(3, $this->getInaccessibleProperty($arrayCache, '_cache'),
|
||||
$this->assertCount(
|
||||
3,
|
||||
$this->getInaccessibleProperty($arrayCache, '_cache'),
|
||||
'The addRules() method was called twice, adding 3 new rules to the UrlManager, but we have only ' .
|
||||
'two additional caches: one for each addRules() method call.'
|
||||
);
|
||||
@ -460,6 +463,5 @@ class UrlManagerParseUrlTest extends TestCase
|
||||
|
||||
$result = $manager->parseRequest($this->getRequest('users/somecontroller/someaction'));
|
||||
$this->assertEquals(['site/index', ['url' => 'users/somecontroller/someaction']], $result);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user