forked from ElfSundae/laravel-apps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
HelpersTest.php
36 lines (31 loc) · 857 Bytes
/
HelpersTest.php
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
32
33
34
35
36
<?php
namespace ElfSundae\Apps\Test;
use Mockery as m;
class HelpersTest extends TestCase
{
public function test_apps()
{
$this->app->instance('apps', 'foo');
$this->assertSame('foo', apps());
}
public function test_app_id()
{
$apps = m::mock('stdClass');
$apps->shouldReceive('id')
->once()
->with('foo', 'bar')
->andReturn('result');
$this->app->instance('apps', $apps);
$this->assertSame('result', app_id('foo', 'bar'));
}
public function test_app_url()
{
$apps = m::mock('stdClass');
$apps->shouldReceive('url')
->once()
->with('a', 'b', 'c')
->andReturn('result');
$this->app->instance('apps', $apps);
$this->assertSame('result', app_url('a', 'b', 'c'));
}
}