[Argil-svn] SF.net SVN: argil: [537] branches/experimental
Status: Alpha
Brought to you by:
tswicegood
|
From: <tsw...@us...> - 2007-05-29 19:59:38
|
Revision: 537
http://argil.svn.sourceforge.net/argil/?rev=537&view=rev
Author: tswicegood
Date: 2007-05-29 12:59:35 -0700 (Tue, 29 May 2007)
Log Message:
-----------
Add in a stub for Argil_Pdo
Added Paths:
-----------
branches/experimental/src/Argil/Pdo.php
branches/experimental/tests/Argil/PdoTest.php
Added: branches/experimental/src/Argil/Pdo.php
===================================================================
--- branches/experimental/src/Argil/Pdo.php (rev 0)
+++ branches/experimental/src/Argil/Pdo.php 2007-05-29 19:59:35 UTC (rev 537)
@@ -0,0 +1,36 @@
+<?php
+
+class Argil_Pdo
+{
+ public function __construct() { }
+
+ public function __sleep() { }
+
+ public function __wakeup() { }
+
+ public function beginTransaction() { }
+
+ public function commit() { }
+
+ public function errorCode() { }
+
+ public function errorInfo() { }
+
+ public function exec($statement) { }
+
+ public function getAttribute($attribute) { }
+
+ public function getAvailableDrivers() { }
+
+ public function lastInsertId($name = null) { }
+
+ public function prepare($string, array $driver_options = array()) { }
+
+ public function query($statement, $p2 = null, $p3 = null, array $p4 = null) { }
+
+ public function quote($string, $parameter_type = PDO::PARAM_STR) { }
+
+ public function rollBack() { }
+
+ public function setAttribute($attribute, $value) { }
+}
\ No newline at end of file
Added: branches/experimental/tests/Argil/PdoTest.php
===================================================================
--- branches/experimental/tests/Argil/PdoTest.php (rev 0)
+++ branches/experimental/tests/Argil/PdoTest.php 2007-05-29 19:59:35 UTC (rev 537)
@@ -0,0 +1,25 @@
+<?php
+
+require_once dirname(__FILE__) . '/../config.php';
+require_once 'Argil/Pdo.php';
+
+class Argil_PdoTest extends UnitTestCase
+{
+ public function testHasAllOfTheSameMethodsAsPdo()
+ {
+ $argil = new ReflectionClass('Argil_Pdo');
+ $pdo = new ReflectionClass('PDO');
+
+ $argilMethods = array();
+ foreach ($argil->getMethods() as $argilMethod) {
+ $argilMethods[] = $argilMethod->getName();
+ }
+
+ foreach ($pdo->getMethods() as $pdoMethod) {
+ $this->assertTrue(
+ in_array($pdoMethod->getName(), $argilMethods),
+ "Checking that {$pdoMethod->getName()} is declared"
+ );
+ }
+ }
+}
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|