powered by nequal
Home » MDB2_Fake » Timeline » 1502

Diffs

MDB2_Fake/trunk/tests/SolveQueryTest.php

@@ -0,0 +1,64 @@
+<?php
+// Call SolveQueryTest::main() if this source file is executed directly.
+if (!defined("PHPUnit2_MAIN_METHOD")) {
+    define("PHPUnit2_MAIN_METHOD", "SolveQueryTest::main");
+}
+
+require_once "PHPUnit2/Framework/TestCase.php";
+require_once "PHPUnit2/Framework/TestSuite.php";
+
+// You may remove the following line when all tests have been implemented.
+require_once "PHPUnit2/Framework/IncompleteTestError.php";
+
+require_once "../src/libs/SolveQuery.php";
+
+/**
+ * Test class for SolveQuery.
+ * Generated by PHPUnit2_Util_Skeleton on 2010-01-07 at 14:40:53.
+ */
+class SolveQueryTest extends PHPUnit2_Framework_TestCase {
+    /**
+     * Runs the test methods of this class.
+     *
+     * @access public
+     * @static
+     */
+    public static function main() {
+        require_once "PHPUnit2/TextUI/TestRunner.php";
+
+        $suite  = new PHPUnit2_Framework_TestSuite("SolveQueryTest");
+        $result = PHPUnit2_TextUI_TestRunner::run($suite);
+    }
+
+    /**
+     * Sets up the fixture, for example, open a network connection.
+     * This method is called before a test is executed.
+     *
+     * @access protected
+     */
+    protected function setUp() {
+    }
+
+    /**
+     * Tears down the fixture, for example, close a network connection.
+     * This method is called after a test is executed.
+     *
+     * @access protected
+     */
+    protected function tearDown() {
+    }
+
+    /**
+     * @todo Implement testFactory().
+     */
+    public function testFactory() {
+        // Remove the following line when you implement this test.
+        throw new PHPUnit2_Framework_IncompleteTestError;
+    }
+}
+
+// Call SolveQueryTest::main() if this source file is executed directly.
+if (PHPUnit2_MAIN_METHOD == "SolveQueryTest::main") {
+    SolveQueryTest::main();
+}
+?>

MDB2_Fake/trunk/tests/DataBaseManagerTest.php

@@ -0,0 +1,136 @@
+<?php
+// Call DataBaseManagerTest::main() if this source file is executed directly.
+if (!defined("PHPUnit2_MAIN_METHOD")) {
+    define("PHPUnit2_MAIN_METHOD", "DataBaseManagerTest::main");
+}
+
+require_once "PHPUnit2/Framework/TestCase.php";
+require_once "PHPUnit2/Framework/TestSuite.php";
+
+// You may remove the following line when all tests have been implemented.
+require_once "PHPUnit2/Framework/IncompleteTestError.php";
+
+require_once "../src/libs/DataBaseManager.php";
+
+/**
+ * Test class for DataBaseManager.
+ * Generated by PHPUnit2_Util_Skeleton on 2010-01-07 at 14:40:42.
+ */
+class DataBaseManagerTest extends PHPUnit2_Framework_TestCase {
+    /**
+     * Runs the test methods of this class.
+     *
+     * @access public
+     * @static
+     */
+    public static function main() {
+        require_once "PHPUnit2/TextUI/TestRunner.php";
+
+        $suite  = new PHPUnit2_Framework_TestSuite("DataBaseManagerTest");
+        $result = PHPUnit2_TextUI_TestRunner::run($suite);
+    }
+
+    /**
+     * Sets up the fixture, for example, open a network connection.
+     * This method is called before a test is executed.
+     *
+     * @access protected
+     */
+    protected function setUp() {
+    }
+
+    /**
+     * Tears down the fixture, for example, close a network connection.
+     * This method is called after a test is executed.
+     *
+     * @access protected
+     */
+    protected function tearDown() {
+    }
+
+    /**
+     * @todo Implement test__init__().
+     */
+    public function test__init__() {
+        // Remove the following line when you implement this test.
+        throw new PHPUnit2_Framework_IncompleteTestError;
+    }
+
+    /**
+     * @todo Implement testNew_connection().
+     */
+    public function testNew_connection() {
+        // Remove the following line when you implement this test.
+        throw new PHPUnit2_Framework_IncompleteTestError;
+    }
+
+    /**
+     * @todo Implement testOpen().
+     */
+    public function testOpen() {
+        // Remove the following line when you implement this test.
+        throw new PHPUnit2_Framework_IncompleteTestError;
+    }
+
+    /**
+     * @todo Implement testClose().
+     */
+    public function testClose() {
+        // Remove the following line when you implement this test.
+        throw new PHPUnit2_Framework_IncompleteTestError;
+    }
+
+    /**
+     * @todo Implement testFree_connection().
+     */
+    public function testFree_connection() {
+        // Remove the following line when you implement this test.
+        throw new PHPUnit2_Framework_IncompleteTestError;
+    }
+
+    /**
+     * @todo Implement testQuery().
+     */
+    public function testQuery() {
+        // Remove the following line when you implement this test.
+        throw new PHPUnit2_Framework_IncompleteTestError;
+    }
+
+    /**
+     * @todo Implement testBeginTransaction().
+     */
+    public function testBeginTransaction() {
+        // Remove the following line when you implement this test.
+        throw new PHPUnit2_Framework_IncompleteTestError;
+    }
+
+    /**
+     * @todo Implement testRollback().
+     */
+    public function testRollback() {
+        // Remove the following line when you implement this test.
+        throw new PHPUnit2_Framework_IncompleteTestError;
+    }
+
+    /**
+     * @todo Implement testCommit().
+     */
+    public function testCommit() {
+        // Remove the following line when you implement this test.
+        throw new PHPUnit2_Framework_IncompleteTestError;
+    }
+
+    /**
+     * @todo Implement testEscape().
+     */
+    public function testEscape() {
+        // Remove the following line when you implement this test.
+        throw new PHPUnit2_Framework_IncompleteTestError;
+    }
+}
+
+// Call DataBaseManagerTest::main() if this source file is executed directly.
+if (PHPUnit2_MAIN_METHOD == "DataBaseManagerTest::main") {
+    DataBaseManagerTest::main();
+}
+?>

MDB2_Fake/trunk/tests/DBTest.php

@@ -0,0 +1,104 @@
+<?php
+// Call DBTest::main() if this source file is executed directly.
+if (!defined("PHPUnit2_MAIN_METHOD")) {
+    define("PHPUnit2_MAIN_METHOD", "DBTest::main");
+}
+
+require_once "PHPUnit2/Framework/TestCase.php";
+require_once "PHPUnit2/Framework/TestSuite.php";
+
+// You may remove the following line when all tests have been implemented.
+require_once "PHPUnit2/Framework/IncompleteTestError.php";
+
+require_once "../src/libs/DB.php";
+
+/**
+ * Test class for DB.
+ * Generated by PHPUnit2_Util_Skeleton on 2010-01-07 at 14:40:38.
+ */
+class DBTest extends PHPUnit2_Framework_TestCase {
+    /**
+     * Runs the test methods of this class.
+     *
+     * @access public
+     * @static
+     */
+    public static function main() {
+        require_once "PHPUnit2/TextUI/TestRunner.php";
+
+        $suite  = new PHPUnit2_Framework_TestSuite("DBTest");
+        $result = PHPUnit2_TextUI_TestRunner::run($suite);
+    }
+
+    /**
+     * Sets up the fixture, for example, open a network connection.
+     * This method is called before a test is executed.
+     *
+     * @access protected
+     */
+    protected function setUp() {
+    }
+
+    /**
+     * Tears down the fixture, for example, close a network connection.
+     * This method is called after a test is executed.
+     *
+     * @access protected
+     */
+    protected function tearDown() {
+    }
+
+    /**
+     * @todo Implement testConnect().
+     */
+    public function testConnect() {
+        // Remove the following line when you implement this test.
+        throw new PHPUnit2_Framework_IncompleteTestError;
+    }
+
+    /**
+     * @todo Implement testSelect_db().
+     */
+    public function testSelect_db() {
+        // Remove the following line when you implement this test.
+        throw new PHPUnit2_Framework_IncompleteTestError;
+    }
+
+    /**
+     * @todo Implement testQuery().
+     */
+    public function testQuery() {
+        // Remove the following line when you implement this test.
+        throw new PHPUnit2_Framework_IncompleteTestError;
+    }
+
+    /**
+     * @todo Implement testFetch_assoc().
+     */
+    public function testFetch_assoc() {
+        // Remove the following line when you implement this test.
+        throw new PHPUnit2_Framework_IncompleteTestError;
+    }
+
+    /**
+     * @todo Implement testEscape().
+     */
+    public function testEscape() {
+        // Remove the following line when you implement this test.
+        throw new PHPUnit2_Framework_IncompleteTestError;
+    }
+
+    /**
+     * @todo Implement testClose().
+     */
+    public function testClose() {
+        // Remove the following line when you implement this test.
+        throw new PHPUnit2_Framework_IncompleteTestError;
+    }
+}
+
+// Call DBTest::main() if this source file is executed directly.
+if (PHPUnit2_MAIN_METHOD == "DBTest::main") {
+    DBTest::main();
+}
+?>

MDB2_Fake/trunk/tests/QueryTest.php

@@ -0,0 +1,80 @@
+<?php
+// Call QueryTest::main() if this source file is executed directly.
+if (!defined("PHPUnit2_MAIN_METHOD")) {
+    define("PHPUnit2_MAIN_METHOD", "QueryTest::main");
+}
+
+require_once "PHPUnit2/Framework/TestCase.php";
+require_once "PHPUnit2/Framework/TestSuite.php";
+
+// You may remove the following line when all tests have been implemented.
+require_once "PHPUnit2/Framework/IncompleteTestError.php";
+
+require_once "../src/libs/Query.php";
+
+/**
+ * Test class for Query.
+ * Generated by PHPUnit2_Util_Skeleton on 2010-01-07 at 14:40:48.
+ */
+class QueryTest extends PHPUnit2_Framework_TestCase {
+    /**
+     * Runs the test methods of this class.
+     *
+     * @access public
+     * @static
+     */
+    public static function main() {
+        require_once "PHPUnit2/TextUI/TestRunner.php";
+
+        $suite  = new PHPUnit2_Framework_TestSuite("QueryTest");
+        $result = PHPUnit2_TextUI_TestRunner::run($suite);
+    }
+
+    /**
+     * Sets up the fixture, for example, open a network connection.
+     * This method is called before a test is executed.
+     *
+     * @access protected
+     */
+    protected function setUp() {
+    }
+
+    /**
+     * Tears down the fixture, for example, close a network connection.
+     * This method is called after a test is executed.
+     *
+     * @access protected
+     */
+    protected function tearDown() {
+    }
+
+    /**
+     * @todo Implement testFetchRow().
+     */
+    public function testFetchRow() {
+        // Remove the following line when you implement this test.
+        throw new PHPUnit2_Framework_IncompleteTestError;
+    }
+
+    /**
+     * @todo Implement testFetchAll().
+     */
+    public function testFetchAll() {
+        // Remove the following line when you implement this test.
+        throw new PHPUnit2_Framework_IncompleteTestError;
+    }
+
+    /**
+     * @todo Implement testFree().
+     */
+    public function testFree() {
+        // Remove the following line when you implement this test.
+        throw new PHPUnit2_Framework_IncompleteTestError;
+    }
+}
+
+// Call QueryTest::main() if this source file is executed directly.
+if (PHPUnit2_MAIN_METHOD == "QueryTest::main") {
+    QueryTest::main();
+}
+?>

MDB2_Fake/trunk/src/MDB.php

@@ -0,0 +1,27 @@
+<?php
+// +----------------------------------------------------------------------+
+// | PHP versions 5                                                       |
+// +----------------------------------------------------------------------+
+// |                                                                      |
+// +----------------------------------------------------------------------+
+/**
+ * データーベースマネージャ
+ * @package   MDB
+ * @author    Ike Tohru <ike.tohru@gmail.com>
+ */
+
+require_once("libs/DataBaseManager.php");
+
+/**
+ * ファクトリーパターン
+ */
+class MDB{
+	public static function factory($dsn){
+        	return new DataBaseManager($dsn);
+	}
+	public static function connect($dsn){
+    		return self::factory($dsn);
+	}
+}
+
+?>
属性に変更があったパス: MDB2_Fake/trunk/src/MDB.php
___________________________________________________________________
追加: svn:executable
+ *