-
Notifications
You must be signed in to change notification settings - Fork 108
/
Copy pathLaravelIntegrationTest.php
47 lines (34 loc) · 1.18 KB
/
LaravelIntegrationTest.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
37
38
39
40
41
42
43
44
45
46
47
<?php
namespace Dingo\Blueprint {
use Doctrine\Common\Annotations\AnnotationReader;
use Illuminate\Support\Collection;
use Illuminate\Filesystem\Filesystem;
use PHPUnit\Framework\TestCase;
class LaravelIntegrationTest extends TestCase
{
protected $simpleExample = <<<'EOT'
FORMAT: 1A
# testing
# Activity
## Show all activities. [GET /activity]
EOT;
public function testGetAnnotationByTypeInLaravel52x()
{
$resources = new Collection([new Tests\Stubs\ActivityController]);
$blueprint = new Blueprint(new AnnotationReader(), new Filesystem);
$this->assertEquals(
trim($this->simpleExample),
$blueprint->generate($resources, 'testing', 'v1', null)
);
}
public function testGetAnnotationByTypeInLaravel53x()
{
$resources = new Collection([new Tests\Stubs\ActivityController]);
$blueprint = new Blueprint(new AnnotationReader, new Filesystem);
$this->assertEquals(
trim($this->simpleExample),
$blueprint->generate($resources, 'testing', 'v1', null)
);
}
}
}