1 | <?php |
||||
2 | |||||
3 | declare(strict_types=1); |
||||
4 | |||||
5 | namespace Yiisoft\Yii\Widgets\Tests\Dropdown; |
||||
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\Dropdown; |
||||
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 | $dropdown = Dropdown::widget(); |
||||
31 | $this->assertNotSame($dropdown, $dropdown->activeClass('')); |
||||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||||
32 | $this->assertNotSame($dropdown, $dropdown->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
![]() |
|||||
33 | $this->assertNotSame($dropdown, $dropdown->containerAttributes([])); |
||||
0 ignored issues
–
show
The method
containerAttributes() 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\Dropdown .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
34 | $this->assertNotSame($dropdown, $dropdown->containerClass('')); |
||||
0 ignored issues
–
show
The method
containerClass() 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\Dropdown .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
35 | $this->assertNotSame($dropdown, $dropdown->containerTag('')); |
||||
0 ignored issues
–
show
The method
containerTag() 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\Dropdown .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
36 | $this->assertNotSame($dropdown, $dropdown->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
![]() |
|||||
37 | $this->assertNotSame($dropdown, $dropdown->dividerAttributes([])); |
||||
0 ignored issues
–
show
The method
dividerAttributes() 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\Dropdown .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
38 | $this->assertNotSame($dropdown, $dropdown->dividerClass('')); |
||||
0 ignored issues
–
show
The method
dividerClass() 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\Dropdown .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
39 | $this->assertNotSame($dropdown, $dropdown->dividerTag('')); |
||||
0 ignored issues
–
show
The method
dividerTag() 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\Dropdown .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
40 | $this->assertNotSame($dropdown, $dropdown->headerClass('')); |
||||
0 ignored issues
–
show
The method
headerClass() 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\Dropdown .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
41 | $this->assertNotSame($dropdown, $dropdown->headerTag('')); |
||||
0 ignored issues
–
show
The method
headerTag() 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\Dropdown .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
42 | $this->assertNotSame($dropdown, $dropdown->id('')); |
||||
0 ignored issues
–
show
The method
id() does not exist on Yiisoft\Widget\Widget . It seems like you code against a sub-type of said class. However, the method does not exist in Yiisoft\Yii\Widgets\Menu or Yiisoft\Yii\Widgets\ContentDecorator or Yiisoft\Yii\Widgets\Breadcrumbs . Are you sure you never get one of those?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
43 | $this->assertNotSame($dropdown, $dropdown->itemClass('')); |
||||
0 ignored issues
–
show
The method
itemClass() 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\Dropdown .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
44 | $this->assertNotSame($dropdown, $dropdown->itemContainer(false)); |
||||
0 ignored issues
–
show
The method
itemContainer() 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\Dropdown .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
45 | $this->assertNotSame($dropdown, $dropdown->itemContainerAttributes([])); |
||||
0 ignored issues
–
show
The method
itemContainerAttributes() 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\Dropdown .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
46 | $this->assertNotSame($dropdown, $dropdown->itemContainerClass('')); |
||||
0 ignored issues
–
show
The method
itemContainerClass() 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\Dropdown .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
47 | $this->assertNotSame($dropdown, $dropdown->itemContainerTag('')); |
||||
0 ignored issues
–
show
The method
itemContainerTag() 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\Dropdown .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
48 | $this->assertNotSame($dropdown, $dropdown->itemTag('')); |
||||
0 ignored issues
–
show
The method
itemTag() 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\Dropdown .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
49 | $this->assertNotSame($dropdown, $dropdown->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
![]() |
|||||
50 | $this->assertNotSame($dropdown, $dropdown->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
![]() |
|||||
51 | $this->assertNotSame($dropdown, $dropdown->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
![]() |
|||||
52 | $this->assertNotSame($dropdown, $dropdown->itemsContainerTag('')); |
||||
0 ignored issues
–
show
The method
itemsContainerTag() 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\Dropdown .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
53 | $this->assertNotSame($dropdown, $dropdown->splitButtonAttributes([])); |
||||
0 ignored issues
–
show
The method
splitButtonAttributes() 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\Dropdown .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
54 | $this->assertNotSame($dropdown, $dropdown->splitButtonClass('')); |
||||
0 ignored issues
–
show
The method
splitButtonClass() 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\Dropdown .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
55 | $this->assertNotSame($dropdown, $dropdown->splitButtonSpanClass('')); |
||||
0 ignored issues
–
show
The method
splitButtonSpanClass() 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\Dropdown .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
56 | $this->assertNotSame($dropdown, $dropdown->toggleAttributes([])); |
||||
0 ignored issues
–
show
The method
toggleAttributes() 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\Dropdown .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
57 | $this->assertNotSame($dropdown, $dropdown->toggleClass('')); |
||||
0 ignored issues
–
show
The method
toggleClass() 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\Dropdown .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
58 | $this->assertNotSame($dropdown, $dropdown->toggleType('')); |
||||
0 ignored issues
–
show
The method
toggleType() 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\Dropdown .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
59 | } |
||||
60 | } |
||||
61 |