예제 #1
0
 private function loadRoutes()
 {
     $routes_cache = new File("/bootstrap/cache/routes.php");
     $routes_cache->includeFileOnce();
 }
예제 #2
0
파일: FileTest.php 프로젝트: mbcraft/piol
 function testIncludeFileOnce()
 {
     $my_var = 1;
     $my_included_file = new File("/test/include_test/include_me_once.php.inc");
     $this->assertTrue($my_included_file->exists());
     $this->assertEquals($my_var, 1, "La variabile e' stata modificata!!");
     $this->assertFalse(function_exists("this_is_a_new_function"), "La funzione da caricare e' gia' presente!!");
     $my_included_file->includeFileOnce();
     $this->assertTrue(function_exists("this_is_a_new_function"), "La funzione da caricare non e' stata caricata!!");
     $my_included_file->includeFileOnce();
     $this->assertEquals($my_var, 1, "La variabile e' stata incrementata!!");
 }