Conditions | 1 |
Paths | 1 |
Total Lines | 16 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | public function testGetAttributesCallback() |
||
14 | { |
||
15 | /** @var Link $link */ |
||
16 | $link = $this->app->make(Link::class, [ |
||
17 | 'attributes' => $this->app->make(Attributes::class, ['attributes' => [ |
||
18 | 'class' => 'color-red', |
||
19 | ]]) |
||
20 | ]); |
||
21 | |||
22 | $hasClass = $link->getAttributes(function($attributes) { |
||
23 | $this->assertInstanceOf(Attributes::class, $attributes); |
||
24 | return $attributes->has('class'); |
||
25 | }); |
||
26 | |||
27 | $this->assertTrue($hasClass); |
||
28 | } |
||
29 | } |