1 | <?php |
||
2 | |||
3 | namespace Maestriam\Samurai\Tests\Feature\Facade; |
||
4 | |||
5 | use Maestriam\Samurai\Exceptions\DirectiveExistsException; |
||
6 | use Maestriam\Samurai\Support\Samurai; |
||
7 | use Maestriam\Samurai\Tests\TestCase; |
||
8 | |||
9 | class CreateIncluderTest extends TestCase |
||
10 | { |
||
11 | public function testCreateIncluder() |
||
12 | { |
||
13 | $theme = 'bands/rainbow'; |
||
14 | $name = 'musics/lady-of-the-lake'; |
||
15 | |||
16 | $this->theme($theme)->findOrCreate(); |
||
17 | |||
18 | $includer = Samurai::theme($theme)->include($name)->create(); |
||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||
19 | |||
20 | $this->assertValidIncluder($includer); |
||
21 | } |
||
22 | |||
23 | public function testExistingIncluder() |
||
24 | { |
||
25 | $theme = 'bands/rainbow'; |
||
26 | $name = 'musics/lady-of-the-lake'; |
||
27 | |||
28 | $this->theme($theme)->findOrCreate(); |
||
29 | |||
30 | $this->expectException(DirectiveExistsException::class); |
||
31 | |||
32 | $includer1 = Samurai::theme($theme)->include($name)->create(); |
||
0 ignored issues
–
show
|
|||
33 | $includer2 = Samurai::theme($theme)->include($name)->create(); |
||
0 ignored issues
–
show
|
|||
34 | } |
||
35 | } |