Skip to content

Commit 7dfd205

Browse files
committed
Added testcase for pr FriendsOfSymfony1#110
1 parent 4af8b67 commit 7dfd205

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

tests/Ticket/gh110TestCase.php

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?php
2+
3+
class Doctrine_Ticket_gh110_TestCase extends Doctrine_UnitTestCase
4+
{
5+
public function testAddActAsColumnsToDocBlock()
6+
{
7+
$builder = new Doctrine_Import_Builder();
8+
$class = $builder->buildDefinition(
9+
array(
10+
'className' => 'Ticket_gh110_TestRecord',
11+
'topLevelClassName' => 'Ticket_gh110_TestRecord',
12+
'is_base_class' => true,
13+
'columns' => array(
14+
'id' => array(
15+
'type' => 'integer',
16+
'length' => 4,
17+
)
18+
),
19+
'actAs' => array(
20+
'SoftDelete' => array(),
21+
'Timestampable' => array(),
22+
)
23+
)
24+
);
25+
26+
$this->assertTrue(preg_match('/@property int\s*\$id/', $class));
27+
$this->assertTrue(preg_match('/@property string\s*\$deleted_at/', $class));
28+
$this->assertTrue(preg_match('/@property string\s*\$created_at/', $class));
29+
$this->assertTrue(preg_match('/@property string\s*\$updated_at/', $class));
30+
}
31+
}

0 commit comments

Comments
 (0)