|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/* |
|
4
|
|
|
* Copyright (C) 2019 Mazarini <[email protected]>. |
|
5
|
|
|
* This file is part of mazarini/design. |
|
6
|
|
|
* |
|
7
|
|
|
* mazarini/design is free software: you can redistribute it and/or |
|
8
|
|
|
* modify it under the terms of the GNU General Public License as published by |
|
9
|
|
|
* the Free Software Foundation, either version 3 of the License, or (at your |
|
10
|
|
|
* option) any later version. |
|
11
|
|
|
* |
|
12
|
|
|
* mazarini/design is distributed in the hope that it will be useful, |
|
13
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
|
14
|
|
|
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
|
15
|
|
|
* more details. |
|
16
|
|
|
* |
|
17
|
|
|
* You should have received a copy of the GNU General Public License |
|
18
|
|
|
*/ |
|
19
|
|
|
|
|
20
|
|
|
namespace App\Tests\Tools; |
|
21
|
|
|
|
|
22
|
|
|
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; |
|
23
|
|
|
|
|
24
|
|
|
class FolderTest extends WebTestCase |
|
25
|
|
|
{ |
|
26
|
|
|
private $folder = null; |
|
27
|
|
|
|
|
28
|
|
|
public function setUp() |
|
29
|
|
|
{ |
|
30
|
|
|
$this->createClient(); |
|
31
|
|
|
$this->folder = self::$container->get('Mazarini\DesignBundle\Tools\Folder'); |
|
32
|
|
|
} |
|
33
|
|
|
|
|
34
|
|
|
public function testStepRoot() |
|
35
|
|
|
{ |
|
36
|
|
|
$this->assertSame( |
|
37
|
|
|
$this->getRootDir().'/lib/Resources/views/steps', |
|
38
|
|
|
$this->folder->getStepRoot() |
|
39
|
|
|
); |
|
40
|
|
|
} |
|
41
|
|
|
|
|
42
|
|
|
public function testLayout() |
|
43
|
|
|
{ |
|
44
|
|
|
$this->assertSame( |
|
45
|
|
|
$this->getRootDir().'/templates/layout.html.twig', |
|
46
|
|
|
$this->folder->getLayout() |
|
47
|
|
|
); |
|
48
|
|
|
} |
|
49
|
|
|
|
|
50
|
|
|
public function testHasLayout() |
|
51
|
|
|
{ |
|
52
|
|
|
$this->assertTrue( |
|
53
|
|
|
$this->folder->hasLayout() |
|
54
|
|
|
); |
|
55
|
|
|
} |
|
56
|
|
|
|
|
57
|
|
|
protected function getRootDir(): string |
|
58
|
|
|
{ |
|
59
|
|
|
return \dirname(__DIR__, 2); |
|
60
|
|
|
} |
|
61
|
|
|
} |
|
62
|
|
|
|