basePath = realpath( dirname( __FILE__ ) ) . '/'; $this->templatePath = $this->basePath . 'templates/'; $this->templateStorePath = $this->basePath . 'stored_templates/'; } public function testDefault() { $conf = new ezcTemplateConfiguration(); self::assertPropertySame( $conf, 'templatePath', "." ); self::assertPropertySame( $conf, 'compilePath', "." ); } public function testInit() { $conf = new ezcTemplateConfiguration( 'templates', 'compiled' ); self::assertPropertySame( $conf, 'templatePath', "templates" ); self::assertPropertySame( $conf, 'compilePath', "compiled" ); } public function testInvalidProperties() { $conf = new ezcTemplateConfiguration(); // try to access non-existing property try { $invalid = $conf->invalid; self::fail( 'Property invalid does not throw not-found exception' ); } catch( ezcBasePropertyNotFoundException $e ) { } } public function testModifyProperties() { $conf = new ezcTemplateConfiguration(); // try to set invalid types for autoloadDefinitions $this->assertSetPropertyFails( $conf, 'autoloadDefinitions', array( true, false, 2, 2.0, 'string' ) ); // Try to set valid path entries $this->assertSetProperty( $conf, 'templatePath', array( 'templates', '.', '/var/templates' ) ); $this->assertSetProperty( $conf, 'compilePath', array( 'compiled-templates', '.', '/var/cache/templates' ) ); } // public function testAutoloaderRegistration() // { // throw new PHPUnit2_Framework_IncompleteTestError; // } } ?>