configuration = new ezcTemplateConfiguration( $dir, "/tmp/template_crap" ); $template->configuration->addExtension( "TestBlocks" ); $template->configuration->addExtension( "LinksCustomBlock" ); $template->configuration->addExtension( "cblockTemplateExtension" ); $template->configuration->addExtension( "Sha1CustomBlock" ); if ( preg_match("#^(\w+)@(\w+)\..*$#", $base, $match ) ) { $contextClass = "ezcTemplate". ucfirst( strtolower( $match[2] ) ) . "Context"; $template->configuration->context = new $contextClass(); } else { $template->configuration->context = new ezcTemplateNoContext(); } $send = substr( $directory, 0, -3 ) . ".send"; if ( file_exists( $send ) ) { $template->send = include ($send); } $out = ""; try { $out = $template->process( $base ); } catch ( Exception $e ) { $out = $e->getMessage(); // Begin of the error message contains the full path. We replace this with 'mock' so that the // tests work on other systems as well. if ( strncmp( $out, $directory, strlen( $directory ) ) == 0 ) { $out = "mock" . substr( $out, strlen( $directory ) ); } } echo ("."); } ?>