@@ -8,7 +8,7 @@ class ClassFileTest extends CodeGenTestCase
8
8
public function testUse ()
9
9
{
10
10
$ use = new UseClass ('\Foo\Bar ' );
11
- is ( ' Foo\Bar ' , $ use-> class );
11
+ $ this -> assertCodeEquals ( ' use Foo\Bar; ' , $ use );
12
12
}
13
13
14
14
public function testClassTemplateWithDefaultOptions ()
@@ -36,27 +36,27 @@ public function testClassTemplate()
36
36
'template ' => 'Class.php.twig ' ,
37
37
'template_dirs ' => array ('src/ClassTemplate/Templates ' ),
38
38
));
39
- ok ($ classTemplate );
39
+ $ this -> assertTrue ($ classTemplate );
40
40
$ classTemplate ->addProperty ('record ' ,'Product ' );
41
41
$ classTemplate ->addProperty ('fields ' , array ('lang ' , 'name ' ));
42
42
$ classTemplate ->addMethod ('public ' ,'getTwo ' ,array (),'return 2; ' );
43
43
$ classTemplate ->addMethod ('public ' ,'getFoo ' ,array ('$i ' ),'return $i; ' );
44
44
45
45
$ this ->evalTemplate ($ classTemplate );
46
46
47
- ok (class_exists ($ classTemplate ->class ->getFullName ()));
47
+ $ this -> assertTrue (class_exists ($ classTemplate ->class ->getFullName ()));
48
48
49
49
$ bar22 = new Foo \Bar1 ;
50
- ok ($ bar22 );
50
+ $ this -> assertTrue ($ bar22 );
51
51
52
- is ('Product ' , $ bar22 ->record );
53
- is (array ('lang ' ,'name ' ), $ bar22 ->fields );
52
+ $ this -> assertEquals ('Product ' , $ bar22 ->record );
53
+ $ this -> assertEquals (array ('lang ' ,'name ' ), $ bar22 ->fields );
54
54
55
- ok (method_exists ($ bar22 ,'getTwo ' ));
56
- ok (method_exists ($ bar22 ,'getFoo ' ));
55
+ $ this -> assertTrue (method_exists ($ bar22 ,'getTwo ' ));
56
+ $ this -> assertTrue (method_exists ($ bar22 ,'getFoo ' ));
57
57
58
- is (2 ,$ bar22 ->getTwo ());
58
+ $ this -> assertEquals (2 ,$ bar22 ->getTwo ());
59
59
60
- is (3 ,$ bar22 ->getFoo (3 ));
60
+ $ this -> assertEquals (3 ,$ bar22 ->getFoo (3 ));
61
61
}
62
62
}
0 commit comments