Completed
Push — master ( 218e95...e3a73f )
by dan
02:12
created

FormatterTestCase::setTwigTemplatesDirectory()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
namespace IrishDan\NotificationBundle\Test\Formatter;
4
5
use IrishDan\NotificationBundle\Test\NotificationTestCase;
6
7
abstract class FormatterTestCase extends NotificationTestCase
8
{
9
    protected $notification;
10
11
    public function setUp()
12
    {
13
        parent::setUp();
14
15
        $this->setTwigTemplatesDirectory();
16
17
        $this->notification = $this->getNotificationWithUser();
18
    }
19
20
    protected function setTwigTemplatesDirectory()
21
    {
22
        $path = __DIR__ . '/../Resources/';
23
        $this->getService('twig.loader')->addPath($path, $namespace = '__main__');
24
    }
25
}