File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
tests/WebFiori/Framework/Tests/Writers Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,11 @@ public function test01() {
8585
8686 $ writter ->writeClass ();
8787 $ clazz = "\\App \\Database \\Migrations \\MyMigration " ;
88+
89+ // Check if file was written and require it
90+ $ filePath = $ writter ->getPath () . DS . $ writter ->getName () . '.php ' ;
91+ $ this ->assertTrue (file_exists ($ filePath ), "Class file was not created: $ filePath " );
92+ require_once $ filePath ;
8893 $ this ->assertTrue (class_exists ($ clazz ));
8994 $ runner ->register ($ clazz );
9095 $ allClasses [] = $ clazz ;
@@ -159,6 +164,11 @@ public function test03() {
159164 $ this ->assertEquals ($ name , $ writter ->getName ());
160165 $ writter ->writeClass ();
161166 $ clazz = "\\App \\Database \\Migrations \\" .$ name ;
167+
168+ // Check if file was written and require it
169+ $ filePath = $ writter ->getPath () . DS . $ writter ->getName () . '.php ' ;
170+ $ this ->assertTrue (file_exists ($ filePath ), "Class file was not created: $ filePath " );
171+ require_once $ filePath ;
162172 $ this ->assertTrue (class_exists ($ clazz ));
163173 $ runner ->register ($ clazz );
164174 $ allClasses [] = $ clazz ;
You can’t perform that action at this time.
0 commit comments