-
Notifications
You must be signed in to change notification settings - Fork 172
Expand file tree
/
Copy pathBase.php
More file actions
31 lines (24 loc) · 1022 Bytes
/
Base.php
File metadata and controls
31 lines (24 loc) · 1022 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
namespace TwigBridge\Tests\Command\Lint;
use TwigBridge\Tests\Base as BridgeBase;
use Mockery as m;
use Symfony\Component\Console\Output\StreamOutput;
class Base extends BridgeBase
{
protected function getApplication(array $customConfig = [])
{
$app = parent::getApplication($customConfig);
$app['twig.extension'] = 'twig';
$app['twig'] = m::mock('TwigBridge\Bridge');
$finder = m::mock('Illuminate\View\ViewFinderInterface');
$finder->shouldReceive('name');
$finder->shouldReceive('in')->andReturn($finder);
$viewFinder = m::mock('Illuminate\View\ViewFinderInterface');
$viewFinder->shouldReceive('getPaths')->andReturn([]); // paths
$viewFinder->shouldReceive('getHints')->andReturn([]); // hints
$viewFinder->shouldReceive('files')->andReturn($finder);
$app['view'] = m::mock('Illuminate\View\Factory');
$app['view']->shouldReceive('getFinder')->andReturn($viewFinder);
return $app;
}
}