Skip to content

Commit 38f9dee

Browse files
committed
Added test for zephir-lang/zephir#1578
1 parent a6d14dc commit 38f9dee

File tree

4 files changed

+58
-0
lines changed

4 files changed

+58
-0
lines changed

composer.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,8 @@
66
"psr-4": {
77
"Zephir\\Parser\\Tests\\": "unit-tests/Extension/"
88
}
9+
},
10+
"require-dev": {
11+
"doctrine/instantiator": "1.0.5"
912
}
1013
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
namespace Example;
2+
3+
/**
4+
* DocBlockFail
5+
*
6+
* @author Paul Scarrone <paul@phalconphp.com>
7+
*/
8+
9+
class DocBlockTest {
10+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?php
2+
3+
return [
4+
[
5+
'type' => 'namespace',
6+
'name' => 'Example',
7+
'file' => data_path('comments/dockblock1.zep'),
8+
'line' => 7,
9+
'char' => 2,
10+
],
11+
[
12+
'type' => 'comment',
13+
'value' => '**
14+
* DocBlockFail
15+
*
16+
* @author Paul Scarrone <paul@phalconphp.com>
17+
*',
18+
'file' => data_path('comments/dockblock1.zep'),
19+
'line' => 9,
20+
'char' => 5,
21+
],
22+
[
23+
'type' => 'class',
24+
'name' => 'DocBlockTest',
25+
'abstract' => 0,
26+
'final' => 0,
27+
'file' => data_path('comments/dockblock1.zep'),
28+
'line' => 9,
29+
'char' => 5,
30+
],
31+
];
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
3+
namespace Zephir\Parser\Tests\Comments;
4+
5+
use Zephir\Parser\Tests\TestCase;
6+
7+
class Dockblock1Test extends TestCase
8+
{
9+
/** @test */
10+
public function shouldProperlyParseDockblock()
11+
{
12+
$this->assertEquals($this->parseFile('comments/dockblock1.zep'), expected('comments/dockblock1.php'));
13+
}
14+
}

0 commit comments

Comments
 (0)