@@ -37,6 +37,11 @@ public function test00() {
3737 $ mapper ->setNamespace ('WebFiori \\Entity ' );
3838 $ writter = new DBClassWriter ('UserDBClass ' , 'WebFiori \\Db ' , $ table );
3939 $ writter ->writeClass ();
40+
41+ // Check if file was written and require it
42+ $ filePath = $ writter ->getPath () . DS . $ writter ->getName () . '.php ' ;
43+ $ this ->assertTrue (file_exists ($ filePath ), "Class file was not created: $ filePath " );
44+ require_once $ filePath ;
4045 $ this ->assertTrue (class_exists ($ writter ->getName (true )));
4146 $ this ->removeClass ($ writter ->getName (true ));
4247 }
@@ -51,6 +56,11 @@ public function test01() {
5156 $ mapper ->setNamespace ('WebFiori \\Entity ' );
5257 $ writter = new DBClassWriter ('EmployeeDB ' , 'WebFiori \\Db ' , $ table );
5358 $ writter ->writeClass ();
59+
60+ // Check if file was written and require it
61+ $ filePath = $ writter ->getPath () . DS . $ writter ->getName () . '.php ' ;
62+ $ this ->assertTrue (file_exists ($ filePath ), "Class file was not created: $ filePath " );
63+ require_once $ filePath ;
5464 $ this ->assertTrue (class_exists ($ writter ->getName (true )));
5565 $ this ->removeClass ($ writter ->getName (true ));
5666 }
@@ -65,6 +75,11 @@ public function test02() {
6575 $ mapper ->setNamespace ('WebFiori \\Entity ' );
6676 $ writter = new DBClassWriter ('PositionDB ' , 'WebFiori \\Db ' , $ table );
6777 $ writter ->writeClass ();
78+
79+ // Check if file was written and require it
80+ $ filePath = $ writter ->getPath () . DS . $ writter ->getName () . '.php ' ;
81+ $ this ->assertTrue (file_exists ($ filePath ), "Class file was not created: $ filePath " );
82+ require_once $ filePath ;
6883 $ this ->assertTrue (class_exists ($ writter ->getName (true )));
6984 $ this ->removeClass ($ writter ->getName (true ));
7085 }
@@ -81,6 +96,11 @@ public function test03() {
8196 $ this ->assertEquals ('ok-connection ' , $ writter ->getConnectionName ());
8297 $ writter ->includeColumnsUpdate ();
8398 $ writter ->writeClass ();
99+
100+ // Check if file was written and require it
101+ $ filePath = $ writter ->getPath () . DS . $ writter ->getName () . '.php ' ;
102+ $ this ->assertTrue (file_exists ($ filePath ), "Class file was not created: $ filePath " );
103+ require_once $ filePath ;
84104 $ this ->assertTrue (class_exists ($ writter ->getName (true )));
85105 $ this ->removeClass ($ writter ->getName (true ));
86106 }
0 commit comments