yiisoft /
yii-widgets
| 1 | <?php |
||||
| 2 | |||||
| 3 | declare(strict_types=1); |
||||
| 4 | |||||
| 5 | namespace Yiisoft\Yii\Widgets\Tests\Menu; |
||||
| 6 | |||||
| 7 | use PHPUnit\Framework\TestCase; |
||||
| 8 | use Yiisoft\Definitions\Exception\CircularReferenceException; |
||||
| 9 | use Yiisoft\Definitions\Exception\InvalidConfigException; |
||||
| 10 | use Yiisoft\Definitions\Exception\NotInstantiableException; |
||||
| 11 | use Yiisoft\Factory\NotFoundException; |
||||
| 12 | use Yiisoft\Yii\Widgets\Menu; |
||||
| 13 | use Yiisoft\Yii\Widgets\Tests\Support\TestTrait; |
||||
| 14 | |||||
| 15 | /** |
||||
| 16 | * @psalm-suppress PropertyNotSetInConstructor |
||||
| 17 | */ |
||||
| 18 | final class ImmutableTest extends TestCase |
||||
| 19 | { |
||||
| 20 | use TestTrait; |
||||
| 21 | |||||
| 22 | /** |
||||
| 23 | * @throws CircularReferenceException |
||||
| 24 | * @throws InvalidConfigException |
||||
| 25 | * @throws NotFoundException |
||||
| 26 | * @throws NotInstantiableException |
||||
| 27 | */ |
||||
| 28 | public function testImmutable(): void |
||||
| 29 | { |
||||
| 30 | $menu = Menu::widget(); |
||||
| 31 | $this->assertNotSame($menu, $menu->afterAttributes([])); |
||||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||||
| 32 | $this->assertNotSame($menu, $menu->afterClass('')); |
||||
|
0 ignored issues
–
show
The method
afterClass() does not exist on Yiisoft\Widget\Widget. It seems like you code against a sub-type of Yiisoft\Widget\Widget such as Yiisoft\Yii\Widgets\Menu.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 33 | $this->assertNotSame($menu, $menu->afterContent('')); |
||||
|
0 ignored issues
–
show
The method
afterContent() does not exist on Yiisoft\Widget\Widget. It seems like you code against a sub-type of Yiisoft\Widget\Widget such as Yiisoft\Yii\Widgets\Menu.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 34 | $this->assertNotSame($menu, $menu->afterTag('')); |
||||
|
0 ignored issues
–
show
The method
afterTag() does not exist on Yiisoft\Widget\Widget. It seems like you code against a sub-type of Yiisoft\Widget\Widget such as Yiisoft\Yii\Widgets\Menu.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 35 | $this->assertNotSame($menu, $menu->activeClass('')); |
||||
|
0 ignored issues
–
show
The method
activeClass() does not exist on Yiisoft\Widget\Widget. It seems like you code against a sub-type of Yiisoft\Widget\Widget such as Yiisoft\Yii\Widgets\Menu or Yiisoft\Yii\Widgets\Dropdown.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 36 | $this->assertNotSame($menu, $menu->attributes([])); |
||||
|
0 ignored issues
–
show
The method
attributes() does not exist on Yiisoft\Widget\Widget. It seems like you code against a sub-type of Yiisoft\Widget\Widget such as Yiisoft\Yii\Widgets\Alert or Yiisoft\Yii\Widgets\Menu or Yiisoft\Yii\Widgets\Breadcrumbs.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 37 | $this->assertNotSame($menu, $menu->beforeAttributes([])); |
||||
|
0 ignored issues
–
show
The method
beforeAttributes() does not exist on Yiisoft\Widget\Widget. It seems like you code against a sub-type of Yiisoft\Widget\Widget such as Yiisoft\Yii\Widgets\Menu.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 38 | $this->assertNotSame($menu, $menu->beforeClass('')); |
||||
|
0 ignored issues
–
show
The method
beforeClass() does not exist on Yiisoft\Widget\Widget. It seems like you code against a sub-type of Yiisoft\Widget\Widget such as Yiisoft\Yii\Widgets\Menu.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 39 | $this->assertNotSame($menu, $menu->beforeContent('')); |
||||
|
0 ignored issues
–
show
The method
beforeContent() does not exist on Yiisoft\Widget\Widget. It seems like you code against a sub-type of Yiisoft\Widget\Widget such as Yiisoft\Yii\Widgets\Menu.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 40 | $this->assertNotSame($menu, $menu->beforeTag('')); |
||||
|
0 ignored issues
–
show
The method
beforeTag() does not exist on Yiisoft\Widget\Widget. It seems like you code against a sub-type of Yiisoft\Widget\Widget such as Yiisoft\Yii\Widgets\Menu.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 41 | $this->assertNotSame($menu, $menu->class('')); |
||||
|
0 ignored issues
–
show
The method
class() does not exist on Yiisoft\Widget\Widget. It seems like you code against a sub-type of Yiisoft\Widget\Widget such as Yiisoft\Yii\Widgets\Alert or Yiisoft\Yii\Widgets\Menu.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 42 | $this->assertNotSame($menu, $menu->container(false)); |
||||
|
0 ignored issues
–
show
The method
container() does not exist on Yiisoft\Widget\Widget. It seems like you code against a sub-type of Yiisoft\Widget\Widget such as Yiisoft\Yii\Widgets\Menu or Yiisoft\Yii\Widgets\Dropdown.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 43 | $this->assertNotSame($menu, $menu->currentPath('')); |
||||
|
0 ignored issues
–
show
The method
currentPath() does not exist on Yiisoft\Widget\Widget. It seems like you code against a sub-type of Yiisoft\Widget\Widget such as Yiisoft\Yii\Widgets\Menu.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 44 | $this->assertNotSame($menu, $menu->disabledClass('')); |
||||
|
0 ignored issues
–
show
The method
disabledClass() does not exist on Yiisoft\Widget\Widget. It seems like you code against a sub-type of Yiisoft\Widget\Widget such as Yiisoft\Yii\Widgets\Menu or Yiisoft\Yii\Widgets\Dropdown.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 45 | $this->assertNotSame($menu, $menu->dropdownContainerClass('')); |
||||
|
0 ignored issues
–
show
The method
dropdownContainerClass() does not exist on Yiisoft\Widget\Widget. It seems like you code against a sub-type of Yiisoft\Widget\Widget such as Yiisoft\Yii\Widgets\Menu.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 46 | $this->assertNotSame($menu, $menu->dropdownDefinitions([])); |
||||
|
0 ignored issues
–
show
The method
dropdownDefinitions() does not exist on Yiisoft\Widget\Widget. It seems like you code against a sub-type of Yiisoft\Widget\Widget such as Yiisoft\Yii\Widgets\Menu.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 47 | $this->assertNotSame($menu, $menu->firstItemClass('')); |
||||
|
0 ignored issues
–
show
The method
firstItemClass() does not exist on Yiisoft\Widget\Widget. It seems like you code against a sub-type of Yiisoft\Widget\Widget such as Yiisoft\Yii\Widgets\Menu.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 48 | $this->assertNotSame($menu, $menu->iconContainerAttributes([])); |
||||
|
0 ignored issues
–
show
The method
iconContainerAttributes() does not exist on Yiisoft\Widget\Widget. It seems like you code against a sub-type of Yiisoft\Widget\Widget such as Yiisoft\Yii\Widgets\Alert or Yiisoft\Yii\Widgets\Menu.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 49 | $this->assertNotSame($menu, $menu->items([])); |
||||
|
0 ignored issues
–
show
The method
items() does not exist on Yiisoft\Widget\Widget. It seems like you code against a sub-type of Yiisoft\Widget\Widget such as Yiisoft\Yii\Widgets\Menu or Yiisoft\Yii\Widgets\Breadcrumbs or Yiisoft\Yii\Widgets\Dropdown.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 50 | $this->assertNotSame($menu, $menu->itemsContainerAttributes([])); |
||||
|
0 ignored issues
–
show
The method
itemsContainerAttributes() does not exist on Yiisoft\Widget\Widget. It seems like you code against a sub-type of Yiisoft\Widget\Widget such as Yiisoft\Yii\Widgets\Menu or Yiisoft\Yii\Widgets\Dropdown.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 51 | $this->assertNotSame($menu, $menu->itemsContainerClass('')); |
||||
|
0 ignored issues
–
show
The method
itemsContainerClass() does not exist on Yiisoft\Widget\Widget. It seems like you code against a sub-type of Yiisoft\Widget\Widget such as Yiisoft\Yii\Widgets\Menu or Yiisoft\Yii\Widgets\Dropdown.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 52 | $this->assertNotSame($menu, $menu->itemsTag('')); |
||||
|
0 ignored issues
–
show
The method
itemsTag() does not exist on Yiisoft\Widget\Widget. It seems like you code against a sub-type of Yiisoft\Widget\Widget such as Yiisoft\Yii\Widgets\Menu.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 53 | $this->assertNotSame($menu, $menu->lastItemClass('')); |
||||
|
0 ignored issues
–
show
The method
lastItemClass() does not exist on Yiisoft\Widget\Widget. It seems like you code against a sub-type of Yiisoft\Widget\Widget such as Yiisoft\Yii\Widgets\Menu.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 54 | $this->assertNotSame($menu, $menu->linkAttributes([])); |
||||
|
0 ignored issues
–
show
The method
linkAttributes() does not exist on Yiisoft\Widget\Widget. It seems like you code against a sub-type of Yiisoft\Widget\Widget such as Yiisoft\Yii\Widgets\Menu.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 55 | $this->assertNotSame($menu, $menu->linkClass('')); |
||||
|
0 ignored issues
–
show
The method
linkClass() does not exist on Yiisoft\Widget\Widget. It seems like you code against a sub-type of Yiisoft\Widget\Widget such as Yiisoft\Yii\Widgets\Menu.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 56 | $this->assertNotSame($menu, $menu->linkTag('')); |
||||
|
0 ignored issues
–
show
The method
linkTag() does not exist on Yiisoft\Widget\Widget. It seems like you code against a sub-type of Yiisoft\Widget\Widget such as Yiisoft\Yii\Widgets\Menu.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 57 | $this->assertNotSame($menu, $menu->tagName('')); |
||||
|
0 ignored issues
–
show
The method
tagName() does not exist on Yiisoft\Widget\Widget. It seems like you code against a sub-type of Yiisoft\Widget\Widget such as Yiisoft\Yii\Widgets\Menu.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 58 | $this->assertNotSame($menu, $menu->template('')); |
||||
|
0 ignored issues
–
show
The method
template() does not exist on Yiisoft\Widget\Widget. It seems like you code against a sub-type of Yiisoft\Widget\Widget such as Yiisoft\Yii\Widgets\Menu.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 59 | } |
||||
| 60 | } |
||||
| 61 |