Exemplo n.º 1
0
		Yeba_Database_Composer::setAdapterType( Yeba_Database_Composer::DB_MYSQL );	
		$testResult['MySQL']['setAdapterType'] = 'Adapter type set to MySQL.';
		try {
			Yeba_Database_Composer::compose();
			$testResult['MySQL']['composeWithoutParameter'] = 'Yeba_Database_Compose triggered without parameters.';
			try {
				$type = Yeba_Database_Composer::getAdapterType();
				$testResult['MySQL']['getAdapterType'] = 'Type provided is ' . $type;
			} catch( Exception $exception ) {
				echo $exception->getMessage(), '<br />';
			}		
		} catch( Exception $exception ) {
			echo $exception->getMessage(), '<br />';
		}		
		try {
			$type = Yeba_Database_Composer::compose( Yeba_Database_Composer::DB_MSSQL );
			$testResult['MySQL']['composeWithParameter'] = 'Yeba_Database_Compose triggered with parameter( MsSQL type )';
			try {
				$type = Yeba_Database_Composer::getAdapterType();
				$testResult['MySQL']['getAdapterTypeAfterCompose'] = 'Type provided is ' . $type;
			} catch( Exception $exception ) {
				echo $exception->getMessage(), '<br />';
			}		
		} catch( Exception $exception ) {
			echo $exception->getMessage(), '<br />';
		}		
	} catch( Exception $exception ) {
		echo $exception->getMessage(), '<br />';
	}		
	 
	require_once( 'views' . DIRECTORY_SEPARATOR . 'Database' . DIRECTORY_SEPARATOR . 'Main.template.yhtml' );