yiisoft /
yii-widgets
| 1 | <?php |
||||
| 2 | |||||
| 3 | declare(strict_types=1); |
||||
| 4 | |||||
| 5 | namespace Yiisoft\Yii\Widgets\Tests\Breadcrumbs; |
||||
| 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\Breadcrumbs; |
||||
| 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 | $breadcrumbs = Breadcrumbs::widget(); |
||||
| 31 | $this->assertNotSame($breadcrumbs, $breadcrumbs->activeItemTemplate('')); |
||||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||||
| 32 | $this->assertNotSame($breadcrumbs, $breadcrumbs->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...
|
|||||
| 33 | $this->assertNotSame($breadcrumbs, $breadcrumbs->homeItem(null)); |
||||
|
0 ignored issues
–
show
The method
homeItem() 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\Breadcrumbs.
(
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($breadcrumbs, $breadcrumbs->items(['label' => 'value'])); |
||||
|
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...
|
|||||
| 35 | $this->assertNotSame($breadcrumbs, $breadcrumbs->itemTemplate('')); |
||||
|
0 ignored issues
–
show
The method
itemTemplate() 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\Breadcrumbs.
(
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($breadcrumbs, $breadcrumbs->tag('ul')); |
||||
|
0 ignored issues
–
show
The method
tag() 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\Breadcrumbs.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 37 | } |
||||
| 38 | } |
||||
| 39 |