File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 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+ }
You can’t perform that action at this time.
0 commit comments