You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by ch...@apache.org on 2008/08/02 16:11:44 UTC

svn commit: r681982 [1/27] - in /incubator/shindig/trunk/php: external/ external/PHPUnit/ external/PHPUnit/Extensions/ external/PHPUnit/Extensions/Database/ external/PHPUnit/Extensions/Database/Constraint/ external/PHPUnit/Extensions/Database/DB/ exter...

Author: chabotc
Date: Sat Aug  2 07:11:35 2008
New Revision: 681982

URL: http://svn.apache.org/viewvc?rev=681982&view=rev
Log:
Adds a working unit test suite to PHP Shindig.

To run the tests (we currently have 86 tests), hit:
	http://<YourShindig>/test/

Code coverage is still a bit lacking, but now that we have a working
test envirioment i hope this will grown quickly.

Note: PHPUnit and some versions of ZendPlatform and/or APC are known to 
      cause the test suite not to run and throw some class errors.
      The only work-around i currently have is to disable apc/zendplatform
      if this happens to you.



Added:
    incubator/shindig/trunk/php/external/
    incubator/shindig/trunk/php/external/PHPUnit/
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/AbstractTester.php
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/Constraint/
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/Constraint/DataSetIsEqual.php
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/Constraint/TableIsEqual.php
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DB/
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DB/DataSet.php
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DB/DefaultDatabaseConnection.php
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DB/FilteredDataSet.php
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DB/IDatabaseConnection.php
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DB/IMetaData.php
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DB/MetaData/
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DB/MetaData.php
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DB/MetaData/InformationSchema.php
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DB/MetaData/MySQL.php
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DB/MetaData/Oci.php
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DB/MetaData/Sqlite.php
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DB/ResultSetTable.php
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DB/Table.php
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DB/TableIterator.php
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DB/TableMetaData.php
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DataSet/
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DataSet/AbstractDataSet.php
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DataSet/AbstractTable.php
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DataSet/AbstractTableMetaData.php
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DataSet/AbstractXmlDataSet.php
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DataSet/DataSetFilter.php
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DataSet/DefaultDataSet.php
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DataSet/DefaultTable.php
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DataSet/DefaultTableIterator.php
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DataSet/DefaultTableMetaData.php
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DataSet/FlatXmlDataSet.php
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DataSet/IDataSet.php
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DataSet/ITable.php
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DataSet/ITableIterator.php
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DataSet/ITableMetaData.php
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DataSet/TableFilter.php
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DataSet/TableMetaDataFilter.php
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DataSet/XmlDataSet.php
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DefaultTester.php
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/ITester.php
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/Operation/
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/Operation/Composite.php
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/Operation/Delete.php
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/Operation/DeleteAll.php
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/Operation/Exception.php
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/Operation/Factory.php
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/Operation/IDatabaseOperation.php
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/Operation/Insert.php
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/Operation/Null.php
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/Operation/Replace.php
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/Operation/RowBased.php
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/Operation/Truncate.php
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/Operation/Update.php
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/TestCase.php
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/ExceptionTestCase.php
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/OutputTestCase.php
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/PerformanceTestCase.php
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/PhptTestCase/
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/PhptTestCase.php
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/PhptTestCase/Logger.php
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/PhptTestSuite.php
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/RepeatedTest.php
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/SeleniumTestCase.php
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/TestDecorator.php
    incubator/shindig/trunk/php/external/PHPUnit/Extensions/TestSetup.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/
    incubator/shindig/trunk/php/external/PHPUnit/Framework.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/Assert.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/AssertionFailedError.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/ComparisonFailure/
    incubator/shindig/trunk/php/external/PHPUnit/Framework/ComparisonFailure.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/ComparisonFailure/Array.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/ComparisonFailure/Object.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/ComparisonFailure/Scalar.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/ComparisonFailure/String.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/ComparisonFailure/Type.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/Constraint/
    incubator/shindig/trunk/php/external/PHPUnit/Framework/Constraint.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/Constraint/And.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/Constraint/ArrayHasKey.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/Constraint/Attribute.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/Constraint/ClassHasAttribute.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/Constraint/ClassHasStaticAttribute.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/Constraint/FileExists.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/Constraint/GreaterThan.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/Constraint/IsAnything.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/Constraint/IsEqual.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/Constraint/IsIdentical.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/Constraint/IsInstanceOf.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/Constraint/IsType.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/Constraint/LessThan.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/Constraint/Not.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/Constraint/ObjectHasAttribute.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/Constraint/Or.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/Constraint/PCREMatch.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/Constraint/StringContains.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/Constraint/TraversableContains.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/Constraint/TraversableContainsOnly.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/Constraint/Xor.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/Error.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/ExpectationFailedException.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/IncompleteTest.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/IncompleteTestError.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/MockObject/
    incubator/shindig/trunk/php/external/PHPUnit/Framework/MockObject/Builder/
    incubator/shindig/trunk/php/external/PHPUnit/Framework/MockObject/Builder/Identity.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/MockObject/Builder/InvocationMocker.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/MockObject/Builder/Match.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/MockObject/Builder/MethodNameMatch.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/MockObject/Builder/Namespace.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/MockObject/Builder/ParametersMatch.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/MockObject/Builder/Stub.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/MockObject/Invocation.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/MockObject/InvocationMocker.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/MockObject/Invokable.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/MockObject/Matcher/
    incubator/shindig/trunk/php/external/PHPUnit/Framework/MockObject/Matcher.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/MockObject/Matcher/AnyInvokedCount.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/MockObject/Matcher/AnyParameters.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/MockObject/Matcher/Invocation.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/MockObject/Matcher/InvokedAtIndex.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/MockObject/Matcher/InvokedAtLeastOnce.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/MockObject/Matcher/InvokedCount.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/MockObject/Matcher/InvokedRecorder.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/MockObject/Matcher/MethodName.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/MockObject/Matcher/Parameters.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/MockObject/Matcher/StatelessInvocation.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/MockObject/Mock.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/MockObject/MockObject.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/MockObject/Stub/
    incubator/shindig/trunk/php/external/PHPUnit/Framework/MockObject/Stub.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/MockObject/Stub/ConsecutiveCalls.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/MockObject/Stub/Exception.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/MockObject/Stub/MatcherCollection.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/MockObject/Stub/Return.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/MockObject/Verifiable.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/Notice.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/SelfDescribing.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/SkippedTest.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/SkippedTestError.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/SkippedTestSuiteError.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/Test.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/TestCase.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/TestFailure.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/TestListener.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/TestResult.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/TestSuite.php
    incubator/shindig/trunk/php/external/PHPUnit/Framework/Warning.php
    incubator/shindig/trunk/php/external/PHPUnit/Runner/
    incubator/shindig/trunk/php/external/PHPUnit/Runner/BaseTestRunner.php
    incubator/shindig/trunk/php/external/PHPUnit/Runner/IncludePathTestCollector.php
    incubator/shindig/trunk/php/external/PHPUnit/Runner/StandardTestSuiteLoader.php
    incubator/shindig/trunk/php/external/PHPUnit/Runner/TestCollector.php
    incubator/shindig/trunk/php/external/PHPUnit/Runner/TestSuiteLoader.php
    incubator/shindig/trunk/php/external/PHPUnit/Runner/Version.php
    incubator/shindig/trunk/php/external/PHPUnit/Samples/
    incubator/shindig/trunk/php/external/PHPUnit/Samples/BankAccount/
    incubator/shindig/trunk/php/external/PHPUnit/Samples/BankAccount/BankAccount.php
    incubator/shindig/trunk/php/external/PHPUnit/Samples/BankAccount/BankAccountTest.php
    incubator/shindig/trunk/php/external/PHPUnit/Samples/BankAccountDB/
    incubator/shindig/trunk/php/external/PHPUnit/Samples/BankAccountDB/BankAccount.php
    incubator/shindig/trunk/php/external/PHPUnit/Samples/BankAccountDB/BankAccountDBTest.php
    incubator/shindig/trunk/php/external/PHPUnit/Samples/BankAccountDB/BankAccountDBTestMySQL.php
    incubator/shindig/trunk/php/external/PHPUnit/Samples/BankAccountDB/_files/
    incubator/shindig/trunk/php/external/PHPUnit/Samples/BankAccountDB/_files/bank-account-after-deposits.xml
    incubator/shindig/trunk/php/external/PHPUnit/Samples/BankAccountDB/_files/bank-account-after-new-account.xml
    incubator/shindig/trunk/php/external/PHPUnit/Samples/BankAccountDB/_files/bank-account-after-withdrawals.xml
    incubator/shindig/trunk/php/external/PHPUnit/Samples/BankAccountDB/_files/bank-account-seed.xml
    incubator/shindig/trunk/php/external/PHPUnit/Samples/FailureTest.php
    incubator/shindig/trunk/php/external/PHPUnit/Samples/Money/
    incubator/shindig/trunk/php/external/PHPUnit/Samples/Money/IMoney.php
    incubator/shindig/trunk/php/external/PHPUnit/Samples/Money/Money.php
    incubator/shindig/trunk/php/external/PHPUnit/Samples/Money/MoneyBag.php
    incubator/shindig/trunk/php/external/PHPUnit/Samples/Money/MoneyTest.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/
    incubator/shindig/trunk/php/external/PHPUnit/Tests/AllTests.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/Extensions/
    incubator/shindig/trunk/php/external/PHPUnit/Tests/Extensions/AllTests.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/Extensions/Database/
    incubator/shindig/trunk/php/external/PHPUnit/Tests/Extensions/Database/AllTests.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/Extensions/Database/DataSet/
    incubator/shindig/trunk/php/external/PHPUnit/Tests/Extensions/Database/DataSet/AllTests.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/Extensions/Database/DataSet/FilterTest.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/Extensions/Database/DataSet/XmlDataSetsTest.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/Extensions/Database/Operation/
    incubator/shindig/trunk/php/external/PHPUnit/Tests/Extensions/Database/Operation/AllTests.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/Extensions/Database/Operation/OperationsTest.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/Extensions/Database/Operation/RowBasedTest.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/Extensions/Database/_files/
    incubator/shindig/trunk/php/external/PHPUnit/Tests/Extensions/Database/_files/XmlDataSets/
    incubator/shindig/trunk/php/external/PHPUnit/Tests/Extensions/Database/_files/XmlDataSets/DeleteAllOperationTest.xml
    incubator/shindig/trunk/php/external/PHPUnit/Tests/Extensions/Database/_files/XmlDataSets/DeleteOperationResult.xml
    incubator/shindig/trunk/php/external/PHPUnit/Tests/Extensions/Database/_files/XmlDataSets/DeleteOperationTest.xml
    incubator/shindig/trunk/php/external/PHPUnit/Tests/Extensions/Database/_files/XmlDataSets/FilteredTestComparison.xml
    incubator/shindig/trunk/php/external/PHPUnit/Tests/Extensions/Database/_files/XmlDataSets/FilteredTestFixture.xml
    incubator/shindig/trunk/php/external/PHPUnit/Tests/Extensions/Database/_files/XmlDataSets/FlatXmlDataSet.xml
    incubator/shindig/trunk/php/external/PHPUnit/Tests/Extensions/Database/_files/XmlDataSets/InsertOperationResult.xml
    incubator/shindig/trunk/php/external/PHPUnit/Tests/Extensions/Database/_files/XmlDataSets/InsertOperationTest.xml
    incubator/shindig/trunk/php/external/PHPUnit/Tests/Extensions/Database/_files/XmlDataSets/OperationsTestFixture.xml
    incubator/shindig/trunk/php/external/PHPUnit/Tests/Extensions/Database/_files/XmlDataSets/ReplaceOperationResult.xml
    incubator/shindig/trunk/php/external/PHPUnit/Tests/Extensions/Database/_files/XmlDataSets/ReplaceOperationTest.xml
    incubator/shindig/trunk/php/external/PHPUnit/Tests/Extensions/Database/_files/XmlDataSets/RowBasedExecute.xml
    incubator/shindig/trunk/php/external/PHPUnit/Tests/Extensions/Database/_files/XmlDataSets/UpdateOperationResult.xml
    incubator/shindig/trunk/php/external/PHPUnit/Tests/Extensions/Database/_files/XmlDataSets/UpdateOperationTest.xml
    incubator/shindig/trunk/php/external/PHPUnit/Tests/Extensions/Database/_files/XmlDataSets/XmlDataSet.xml
    incubator/shindig/trunk/php/external/PHPUnit/Tests/Extensions/OutputTestCaseTest.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/Extensions/PerformanceTestCaseTest.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/Extensions/RepeatedTestTest.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/Extensions/SeleniumTestCaseTest.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/Framework/
    incubator/shindig/trunk/php/external/PHPUnit/Tests/Framework/AllTests.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/Framework/AssertTest.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/Framework/ComparisonFailureTest.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/Framework/ConstraintTest.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/Framework/MockObjectTest.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/Framework/SuiteTest.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/Framework/TestCaseTest.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/Framework/TestImplementorTest.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/Framework/TestListenerTest.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/Runner/
    incubator/shindig/trunk/php/external/PHPUnit/Tests/Runner/AllTests.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/Runner/BaseTestRunnerTest.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/TestConfiguration.php.dist
    incubator/shindig/trunk/php/external/PHPUnit/Tests/Util/
    incubator/shindig/trunk/php/external/PHPUnit/Tests/Util/AllTests.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/Util/TestDox/
    incubator/shindig/trunk/php/external/PHPUnit/Tests/Util/TestDox/AllTests.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/Util/TestDox/NamePrettifierTest.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/Util/TimerTest.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/_files/
    incubator/shindig/trunk/php/external/PHPUnit/Tests/_files/AnInterface.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/_files/BankAccount.json
    incubator/shindig/trunk/php/external/PHPUnit/Tests/_files/BankAccount.metrics
    incubator/shindig/trunk/php/external/PHPUnit/Tests/_files/BankAccount.pmd
    incubator/shindig/trunk/php/external/PHPUnit/Tests/_files/BankAccount.tap
    incubator/shindig/trunk/php/external/PHPUnit/Tests/_files/BankAccount.xml
    incubator/shindig/trunk/php/external/PHPUnit/Tests/_files/ClassWithNonPublicAttributes.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/_files/DoubleTestCase.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/_files/Error.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/_files/Failure.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/_files/InheritedTestCase.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/_files/MockRunner.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/_files/NoArgTestCaseTest.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/_files/NoTestCaseClass.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/_files/NoTestCases.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/_files/NonStatic.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/_files/NotPublicTestCase.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/_files/NotVoidTestCase.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/_files/OneTestCase.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/_files/OutputTestCase.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/_files/OverrideTestCase.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/_files/SampleClass.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/_files/SetupFailure.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/_files/Sleep.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/_files/Struct.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/_files/Success.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/_files/TearDownFailure.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/_files/TestIterator.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/_files/ThrowExceptionTestCase.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/_files/ThrowNoExceptionTestCase.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/_files/TornDown.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/_files/TornDown2.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/_files/TornDown3.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/_files/TornDown4.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/_files/TornDown5.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/_files/WasRun.php
    incubator/shindig/trunk/php/external/PHPUnit/Tests/_files/bar.xml
    incubator/shindig/trunk/php/external/PHPUnit/Tests/_files/foo.xml
    incubator/shindig/trunk/php/external/PHPUnit/TextUI/
    incubator/shindig/trunk/php/external/PHPUnit/TextUI/Command.php
    incubator/shindig/trunk/php/external/PHPUnit/TextUI/ResultPrinter.php
    incubator/shindig/trunk/php/external/PHPUnit/TextUI/TestRunner.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/
    incubator/shindig/trunk/php/external/PHPUnit/Util/Class.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/CodeCoverage.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/Configuration.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/ErrorHandler.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/Fileloader.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/Filesystem.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/Filter.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/FilterIterator.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/Getopt.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/Log/
    incubator/shindig/trunk/php/external/PHPUnit/Util/Log/CPD.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/Log/CodeCoverage/
    incubator/shindig/trunk/php/external/PHPUnit/Util/Log/CodeCoverage/Database.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/Log/CodeCoverage/XML.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/Log/Database/
    incubator/shindig/trunk/php/external/PHPUnit/Util/Log/Database.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/Log/Database/MySQL.sql
    incubator/shindig/trunk/php/external/PHPUnit/Util/Log/Database/SQLite3.sql
    incubator/shindig/trunk/php/external/PHPUnit/Util/Log/GraphViz.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/Log/JSON.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/Log/Metrics.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/Log/PEAR.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/Log/PMD/
    incubator/shindig/trunk/php/external/PHPUnit/Util/Log/PMD.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/Log/PMD/Rule/
    incubator/shindig/trunk/php/external/PHPUnit/Util/Log/PMD/Rule.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/Log/PMD/Rule/Class/
    incubator/shindig/trunk/php/external/PHPUnit/Util/Log/PMD/Rule/Class.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/Log/PMD/Rule/Class/DepthOfInheritanceTree.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/Log/PMD/Rule/Class/EfferentCoupling.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/Log/PMD/Rule/Class/ExcessiveClassLength.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/Log/PMD/Rule/Class/ExcessivePublicCount.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/Log/PMD/Rule/Class/TooManyFields.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/Log/PMD/Rule/File.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/Log/PMD/Rule/Function/
    incubator/shindig/trunk/php/external/PHPUnit/Util/Log/PMD/Rule/Function.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/Log/PMD/Rule/Function/CRAP.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/Log/PMD/Rule/Function/CodeCoverage.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/Log/PMD/Rule/Function/CyclomaticComplexity.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/Log/PMD/Rule/Function/ExcessiveMethodLength.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/Log/PMD/Rule/Function/ExcessiveParameterList.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/Log/PMD/Rule/Function/NPathComplexity.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/Log/PMD/Rule/Project/
    incubator/shindig/trunk/php/external/PHPUnit/Util/Log/PMD/Rule/Project.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/Log/PMD/Rule/Project/CRAP.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/Log/TAP.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/Log/XML.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/Metrics/
    incubator/shindig/trunk/php/external/PHPUnit/Util/Metrics.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/Metrics/Class.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/Metrics/File.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/Metrics/Function.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/Metrics/Project.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/PDO.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/Printer.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/Report/
    incubator/shindig/trunk/php/external/PHPUnit/Util/Report.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/Report/Node/
    incubator/shindig/trunk/php/external/PHPUnit/Util/Report/Node.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/Report/Node/Directory.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/Report/Node/File.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/Report/Template/
    incubator/shindig/trunk/php/external/PHPUnit/Util/Report/Template/butter.png   (with props)
    incubator/shindig/trunk/php/external/PHPUnit/Util/Report/Template/chameleon.png   (with props)
    incubator/shindig/trunk/php/external/PHPUnit/Util/Report/Template/close12_1.gif   (with props)
    incubator/shindig/trunk/php/external/PHPUnit/Util/Report/Template/container-min.js
    incubator/shindig/trunk/php/external/PHPUnit/Util/Report/Template/container.css
    incubator/shindig/trunk/php/external/PHPUnit/Util/Report/Template/directory.html
    incubator/shindig/trunk/php/external/PHPUnit/Util/Report/Template/file.html
    incubator/shindig/trunk/php/external/PHPUnit/Util/Report/Template/file_no_yui.html
    incubator/shindig/trunk/php/external/PHPUnit/Util/Report/Template/glass.png   (with props)
    incubator/shindig/trunk/php/external/PHPUnit/Util/Report/Template/item.html
    incubator/shindig/trunk/php/external/PHPUnit/Util/Report/Template/method_item.html
    incubator/shindig/trunk/php/external/PHPUnit/Util/Report/Template/scarlet_red.png   (with props)
    incubator/shindig/trunk/php/external/PHPUnit/Util/Report/Template/snow.png   (with props)
    incubator/shindig/trunk/php/external/PHPUnit/Util/Report/Template/style.css
    incubator/shindig/trunk/php/external/PHPUnit/Util/Report/Template/yahoo-dom-event.js
    incubator/shindig/trunk/php/external/PHPUnit/Util/Report/Template/yui_item.js
    incubator/shindig/trunk/php/external/PHPUnit/Util/Skeleton/
    incubator/shindig/trunk/php/external/PHPUnit/Util/Skeleton.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/Skeleton/IncompleteTestMethod.tpl
    incubator/shindig/trunk/php/external/PHPUnit/Util/Skeleton/TestClass.tpl
    incubator/shindig/trunk/php/external/PHPUnit/Util/Skeleton/TestMethod.tpl
    incubator/shindig/trunk/php/external/PHPUnit/Util/Skeleton/TestMethodBool.tpl
    incubator/shindig/trunk/php/external/PHPUnit/Util/Skeleton/TestMethodBoolStatic.tpl
    incubator/shindig/trunk/php/external/PHPUnit/Util/Skeleton/TestMethodException.tpl
    incubator/shindig/trunk/php/external/PHPUnit/Util/Skeleton/TestMethodExceptionStatic.tpl
    incubator/shindig/trunk/php/external/PHPUnit/Util/Skeleton/TestMethodStatic.tpl
    incubator/shindig/trunk/php/external/PHPUnit/Util/Template.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/Test.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/TestDox/
    incubator/shindig/trunk/php/external/PHPUnit/Util/TestDox/NamePrettifier.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/TestDox/ResultPrinter/
    incubator/shindig/trunk/php/external/PHPUnit/Util/TestDox/ResultPrinter.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/TestDox/ResultPrinter/HTML.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/TestDox/ResultPrinter/Text.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/TestSuiteIterator.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/Timer.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/Type.php
    incubator/shindig/trunk/php/external/PHPUnit/Util/XML.php
    incubator/shindig/trunk/php/test/
    incubator/shindig/trunk/php/test/common/
    incubator/shindig/trunk/php/test/common/CacheFileTest.php
    incubator/shindig/trunk/php/test/common/HttpServletTest.php
    incubator/shindig/trunk/php/test/common/UrlGeneratorTest.php
    incubator/shindig/trunk/php/test/gadgets/
    incubator/shindig/trunk/php/test/gadgets/GadgetContextTest.php
    incubator/shindig/trunk/php/test/gadgets/GadgetIdTest.php
    incubator/shindig/trunk/php/test/gadgets/GadgetServerTest.php
    incubator/shindig/trunk/php/test/gadgets/GadgetSpecParserTest.php
    incubator/shindig/trunk/php/test/gadgets/GadgetTest.php
    incubator/shindig/trunk/php/test/gadgets/JsFeatureLoaderInvalid.php
    incubator/shindig/trunk/php/test/gadgets/JsLibraryTest.php
    incubator/shindig/trunk/php/test/gadgets/MessageBundleParserTest.php
    incubator/shindig/trunk/php/test/gadgets/MessageBundleTest.php
    incubator/shindig/trunk/php/test/gadgets/ProxyHandlerTest.php
    incubator/shindig/trunk/php/test/gadgets/SubstitutionsTest.php
    incubator/shindig/trunk/php/test/gadgets/UserPrefsTest.php
    incubator/shindig/trunk/php/test/gadgets/ViewSpecTest.php
    incubator/shindig/trunk/php/test/gadgets/dummie_script.js
    incubator/shindig/trunk/php/test/gadgets/example.xml
    incubator/shindig/trunk/php/test/index.php
    incubator/shindig/trunk/php/test/social-api/

Added: incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/AbstractTester.php
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/AbstractTester.php?rev=681982&view=auto
==============================================================================
--- incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/AbstractTester.php (added)
+++ incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/AbstractTester.php Sat Aug  2 07:11:35 2008
@@ -0,0 +1,206 @@
+<?php
+/**
+ * PHPUnit
+ *
+ * Copyright (c) 2002-2008, Sebastian Bergmann <sb...@sebastian-bergmann.de>.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *   * Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *   * Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in
+ *     the documentation and/or other materials provided with the
+ *     distribution.
+ *
+ *   * Neither the name of Sebastian Bergmann nor the names of his
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * @category   Testing
+ * @package    PHPUnit
+ * @author     Mike Lively <m...@digitalsandwich.com>
+ * @copyright  2002-2008 Sebastian Bergmann <sb...@sebastian-bergmann.de>
+ * @license    http://www.opensource.org/licenses/bsd-license.php  BSD License
+ * @version    SVN: $Id:AbstractDatabaseTester.php 1254 2008-09-02 04:36:15Z mlively $
+ * @link       http://www.phpunit.de/
+ * @since      File available since Release 3.2.0
+ */
+
+require_once 'PHPUnit/Framework.php';
+require_once 'PHPUnit/Util/Filter.php';
+
+require_once 'PHPUnit/Extensions/Database/ITester.php';
+
+PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
+
+/**
+ * Can be used as a foundation for new DatabaseTesters.
+ *
+ * @category   Testing
+ * @package    PHPUnit
+ * @author     Mike Lively <m...@digitalsandwich.com>
+ * @copyright  2008 Mike Lively <m...@digitalsandwich.com>
+ * @license    http://www.opensource.org/licenses/bsd-license.php  BSD License
+ * @version    Release: 3.2.9
+ * @link       http://www.phpunit.de/
+ * @since      Class available since Release 3.2.0
+ */
+abstract class PHPUnit_Extensions_Database_AbstractTester implements PHPUnit_Extensions_Database_ITester
+{
+
+    /**
+     * @var PHPUnit_Extensions_Database_Operation_IDatabaseOperation
+     */
+    protected $setUpOperation;
+
+    /**
+     * @var PHPUnit_Extensions_Database_Operation_IDatabaseOperation
+     */
+    protected $tearDownOperation;
+
+    /**
+     * @var PHPUnit_Extensions_Database_DataSet_IDataSet
+     */
+    protected $dataSet;
+
+    /**
+     * @var string
+     */
+    protected $schema;
+
+    /**
+     * Creates a new database tester.
+     * 
+     * @param PHPUnit_Extensions_Database_DB_IDatabaseConnection $databaseConnection
+     */
+    public function __construct()
+    {
+        $this->setUpOperation = PHPUnit_Extensions_Database_Operation_Factory::CLEAN_INSERT();
+        $this->tearDownOperation = PHPUnit_Extensions_Database_Operation_Factory::NONE();
+    }
+
+    /**
+     * Closes the specified connection.
+     *
+     * @param PHPUnit_Extensions_Database_DB_IDatabaseConnection $connection
+     */
+    public function closeConnection(PHPUnit_Extensions_Database_DB_IDatabaseConnection $connection)
+    {
+        $connection->close();
+    }
+
+    /**
+     * Returns the test dataset.
+     *
+     * @return PHPUnit_Extensions_Database_DataSet_IDataSet
+     */
+    public function getDataSet()
+    {
+        return $this->dataSet;
+    }
+
+    /**
+     * TestCases must call this method inside setUp().
+     */
+    public function onSetUp()
+    {
+        $this->getSetUpOperation()->execute($this->getConnection(), $this->getDataSet());
+    }
+
+    /**
+     * TestCases must call this method inside tearDown().
+     */
+    public function onTearDown()
+    {
+        $this->getTearDownOperation()->execute($this->getConnection(), $this->getDataSet());
+    }
+
+    /**
+     * Sets the test dataset to use.
+     *
+     * @param PHPUnit_Extensions_Database_DataSet_IDataSet $dataSet
+     */
+    public function setDataSet(PHPUnit_Extensions_Database_DataSet_IDataSet $dataSet)
+    {
+        $this->dataSet = $dataSet;
+    }
+
+    /**
+     * Sets the schema value.
+     *
+     * @param string $schema
+     */
+    public function setSchema($schema)
+    {
+        $this->schema = $schema;
+    }
+
+    /**
+     * Sets the DatabaseOperation to call when starting the test.
+     *
+     * @param PHPUnit_Extensions_Database_Operation_DatabaseOperation $setUpOperation
+     */
+    public function setSetUpOperation(PHPUnit_Extensions_Database_Operation_IDatabaseOperation $setUpOperation)
+    {
+        $this->setUpOperation = $setUpOperation;
+    }
+
+    /**
+     * Sets the DatabaseOperation to call when ending the test.
+     *
+     * @param PHPUnit_Extensions_Database_Operation_DatabaseOperation $tearDownOperation
+     */
+    public function setTearDownOperation(PHPUnit_Extensions_Database_Operation_IDatabaseOperation $tearDownOperation)
+    {
+        $this->tearDownOperation = $tearDownOperation;
+    }
+
+    /**
+     * Returns the schema value
+     *
+     * @return string
+     */
+    protected function getSchema()
+    {
+        return $this->schema;
+    }
+
+    /**
+     * Returns the database operation that will be called when starting the test.
+     *
+     * @return PHPUnit_Extensions_Database_Operation_DatabaseOperation
+     */
+    protected function getSetUpOperation()
+    {
+        return $this->setUpOperation;
+    }
+
+    /**
+     * Returns the database operation that will be called when ending the test.
+     *
+     * @return PHPUnit_Extensions_Database_Operation_DatabaseOperation
+     */
+    protected function getTearDownOperation()
+    {
+        return $this->tearDownOperation;
+    }
+}
+?>

Added: incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/Constraint/DataSetIsEqual.php
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/Constraint/DataSetIsEqual.php?rev=681982&view=auto
==============================================================================
--- incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/Constraint/DataSetIsEqual.php (added)
+++ incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/Constraint/DataSetIsEqual.php Sat Aug  2 07:11:35 2008
@@ -0,0 +1,148 @@
+<?php
+/**
+ * PHPUnit
+ *
+ * Copyright (c) 2002-2008, Sebastian Bergmann <sb...@sebastian-bergmann.de>.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *   * Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *   * Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in
+ *     the documentation and/or other materials provided with the
+ *     distribution.
+ *
+ *   * Neither the name of Sebastian Bergmann nor the names of his
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * @category   Testing
+ * @package    PHPUnit
+ * @author     Mike Lively <m...@digitalsandwich.com>
+ * @copyright  2002-2008 Sebastian Bergmann <sb...@sebastian-bergmann.de>
+ * @license    http://www.opensource.org/licenses/bsd-license.php  BSD License
+ * @version    SVN: $Id: DataSetIsEqual.php 1985 2007-12-26 18:11:55Z sb $
+ * @link       http://www.phpunit.de/
+ * @since      File available since Release 3.2.0
+ */
+
+require_once 'PHPUnit/Framework.php';
+require_once 'PHPUnit/Util/Filter.php';
+require_once 'PHPUnit/Framework/Constraint.php';
+
+PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
+
+/**
+ * Asserts whether or not two dbunit datasets are equal.
+ *
+ * @category   Testing
+ * @package    PHPUnit
+ * @author     Mike Lively <m...@digitalsandwich.com>
+ * @copyright  2008 Mike Lively <m...@digitalsandwich.com>
+ * @license    http://www.opensource.org/licenses/bsd-license.php  BSD License
+ * @version    Release: 3.2.9
+ * @link       http://www.phpunit.de/
+ * @since      Class available since Release 3.2.0
+ */
+class PHPUnit_Extensions_Database_Constraint_DataSetIsEqual extends PHPUnit_Framework_Constraint
+{
+
+    /**
+     * @var PHPUnit_Extensions_Database_DataSet_IDataSet
+     */
+    protected $value;
+
+    /**
+     * @var string
+     */
+    protected $failure_reason;
+
+    /**
+     * Creates a new constraint.
+     *
+     * @param PHPUnit_Extensions_Database_DataSet_IDataSet $value
+     */
+    public function __construct(PHPUnit_Extensions_Database_DataSet_IDataSet $value)
+    {
+        $this->value = $value;
+    }
+
+    /**
+     * Determines whether or not the given dataset matches the dataset used to 
+     * create this constraint.
+     *
+     * @param PHPUnit_Extensions_Database_DataSet_IDataSet $other
+     * @return bool
+     */
+    public function evaluate($other)
+    {
+        if ($other instanceof PHPUnit_Extensions_Database_DataSet_IDataSet) {
+            try {
+                $this->value->assertEquals($other);
+                return TRUE;
+            } catch (Exception $e) {
+                $this->failure_reason = $e->getMessage();
+                return FALSE;
+            }
+        } else {
+            throw new InvalidArgumentException("PHPUnit_Extensions_Database_DataSet_IDataSet expected");
+        }
+    }
+
+    /**
+     * @param   mixed   $other The value passed to evaluate() which failed the
+     *                         constraint check.
+     * @param   string  $description A string with extra description of what was
+     *                               going on while the evaluation failed.
+     * @param   boolean $not Flag to indicate negation.
+     * @throws  PHPUnit_Framework_ExpectationFailedException
+     */
+    protected function failureDescription($other, $description, $not)
+    {
+        $failureDescription = sprintf('Failed asserting that %s %s Reason: %s', 
+            $other->__toString(), 
+            $this->toString(), 
+            $this->failure_reason);
+        
+        if ($not) {
+            $failureDescription = self::negate($failureDescription);
+        }
+        
+        if (!empty($description)) {
+            $failureDescription = $description . "\n" . $failureDescription;
+        }
+        
+        return $failureDescription;
+    }
+
+    /**
+     * Returns a string representation of the constraint.
+     *
+     * @return string
+     * @access public
+     */
+    public function toString()
+    {
+        return sprintf('is equal to %s', 
+            $this->value->__toString());
+    }
+}
+?>

Added: incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/Constraint/TableIsEqual.php
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/Constraint/TableIsEqual.php?rev=681982&view=auto
==============================================================================
--- incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/Constraint/TableIsEqual.php (added)
+++ incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/Constraint/TableIsEqual.php Sat Aug  2 07:11:35 2008
@@ -0,0 +1,150 @@
+<?php
+/**
+ * PHPUnit
+ *
+ * Copyright (c) 2002-2008, Sebastian Bergmann <sb...@sebastian-bergmann.de>.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *   * Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *   * Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in
+ *     the documentation and/or other materials provided with the
+ *     distribution.
+ *
+ *   * Neither the name of Sebastian Bergmann nor the names of his
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * @category   Testing
+ * @package    PHPUnit
+ * @author     Mike Lively <m...@digitalsandwich.com>
+ * @copyright  2002-2008 Sebastian Bergmann <sb...@sebastian-bergmann.de>
+ * @license    http://www.opensource.org/licenses/bsd-license.php  BSD License
+ * @version    SVN: $Id: TableIsEqual.php 1985 2007-12-26 18:11:55Z sb $
+ * @link       http://www.phpunit.de/
+ * @since      File available since Release 3.2.0
+ */
+
+require_once 'PHPUnit/Framework.php';
+require_once 'PHPUnit/Util/Filter.php';
+require_once 'PHPUnit/Framework/Constraint.php';
+
+PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
+
+/**
+ * Asserts whether or not two dbunit tables are equal.
+ *
+ * @category   Testing
+ * @package    PHPUnit
+ * @author     Mike Lively <m...@digitalsandwich.com>
+ * @copyright  2008 Mike Lively <m...@digitalsandwich.com>
+ * @license    http://www.opensource.org/licenses/bsd-license.php  BSD License
+ * @version    Release: 3.2.9
+ * @link       http://www.phpunit.de/
+ * @since      Class available since Release 3.2.0
+ */
+class PHPUnit_Extensions_Database_Constraint_TableIsEqual extends PHPUnit_Framework_Constraint
+{
+
+    /**
+     * @var PHPUnit_Extensions_Database_DataSet_ITable
+     */
+    protected $value;
+
+    /**
+     * @var string
+     */
+    protected $failure_reason;
+
+    /**
+     * Creates a new constraint.
+     *
+     * @param PHPUnit_Extensions_Database_DataSet_ITable $value
+     */
+    public function __construct(PHPUnit_Extensions_Database_DataSet_ITable $value)
+    {
+        $this->value = $value;
+    }
+
+    /**
+     * Determines whether or not the given table matches the table used to 
+     * create this constraint.
+     *
+     * @param PHPUnit_Extensions_Database_DataSet_ITable $other
+     * @return bool
+     */
+    public function evaluate($other)
+    {
+        if ($other instanceof PHPUnit_Extensions_Database_DataSet_ITable) {
+            try {
+                $this->value->assertEquals($other);
+                return TRUE;
+            } catch (Exception $e) {
+                $this->failure_reason = $e->getMessage();
+                return FALSE;
+            }
+        } else {
+            throw new InvalidArgumentException("PHPUnit_Extensions_Database_DataSet_ITable expected");
+        }
+    }
+
+    /**
+     * @param   mixed   $other The value passed to evaluate() which failed the
+     *                         constraint check.
+     * @param   string  $description A string with extra description of what was
+     *                               going on while the evaluation failed.
+     * @param   boolean $not Flag to indicate negation.
+     * @throws  PHPUnit_Framework_ExpectationFailedException
+     */
+    protected function failureDescription($other, $description, $not)
+    {
+        $failureDescription = sprintf('Failed asserting that %s %s Reason: %s', 
+            $other->__toString(), 
+            $this->toString(), 
+            $this->failure_reason
+        );
+        
+        if ($not) {
+            $failureDescription = self::negate($failureDescription);
+        }
+        
+        if (!empty($description)) {
+            $failureDescription = $description . "\n" . $failureDescription;
+        }
+        
+        return $failureDescription;
+    }
+
+    /**
+     * Returns a string representation of the constraint.
+     *
+     * @return string
+     * @access public
+     */
+    public function toString()
+    {
+        return sprintf('is equal to %s', 
+
+        PHPUnit_Util_Type::toString($this->value));
+    }
+}
+?>

Added: incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DB/DataSet.php
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DB/DataSet.php?rev=681982&view=auto
==============================================================================
--- incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DB/DataSet.php (added)
+++ incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DB/DataSet.php Sat Aug  2 07:11:35 2008
@@ -0,0 +1,173 @@
+<?php
+/**
+ * PHPUnit
+ *
+ * Copyright (c) 2002-2008, Sebastian Bergmann <sb...@sebastian-bergmann.de>.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *   * Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *   * Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in
+ *     the documentation and/or other materials provided with the
+ *     distribution.
+ *
+ *   * Neither the name of Sebastian Bergmann nor the names of his
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * @category   Testing
+ * @package    PHPUnit
+ * @author     Mike Lively <m...@digitalsandwich.com>
+ * @copyright  2002-2008 Sebastian Bergmann <sb...@sebastian-bergmann.de>
+ * @license    http://www.opensource.org/licenses/bsd-license.php  BSD License
+ * @version    SVN: $Id:DataSet.php 1254 2008-09-02 04:36:15Z mlively $
+ * @link       http://www.phpunit.de/
+ * @since      File available since Release 3.2.0
+ */
+
+require_once 'PHPUnit/Framework.php';
+require_once 'PHPUnit/Util/Filter.php';
+
+require_once 'PHPUnit/Extensions/Database/DataSet/AbstractDataSet.php';
+require_once 'PHPUnit/Extensions/Database/DB/TableIterator.php';
+require_once 'PHPUnit/Extensions/Database/DB/Table.php';
+
+PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
+
+/**
+ * Provides access to a database instance as a data set.
+ *
+ * @category   Testing
+ * @package    PHPUnit
+ * @author     Mike Lively <m...@digitalsandwich.com>
+ * @copyright  2008 Mike Lively <m...@digitalsandwich.com>
+ * @license    http://www.opensource.org/licenses/bsd-license.php  BSD License
+ * @version    Release: 3.2.9
+ * @link       http://www.phpunit.de/
+ * @since      Class available since Release 3.2.0
+ */
+class PHPUnit_Extensions_Database_DB_DataSet extends PHPUnit_Extensions_Database_DataSet_AbstractDataSet
+{
+
+    /**
+     * An array of ITable objects.
+     *
+     * @var array
+     */
+    protected $tables = array();
+
+    /**
+     * The database connection this dataset is using.
+     *
+     * @var PHPUnit_Extensions_Database_DB_DefaultDatabaseConnection
+     */
+    protected $databaseConnection;
+
+    /**
+     * Creates a new dataset using the given database connection.
+     *
+     * @param PHPUnit_Extensions_Database_DB_DefaultDatabaseConnection $databaseConnection
+     */
+    public function __construct(PHPUnit_Extensions_Database_DB_DefaultDatabaseConnection $databaseConnection)
+    {
+        $this->databaseConnection = $databaseConnection;
+    }
+
+    /**
+     * Creates the query necessary to pull all of the data from a table.
+     *
+     * @param PHPUnit_Extensions_Database_DataSet_ITableMetaData $tableMetaData
+     * @return unknown
+     */
+    public static function buildTableSelect(PHPUnit_Extensions_Database_DataSet_ITableMetaData $tableMetaData)
+    {
+        if ($tableMetaData->getTableName() == '') {
+            $e = new Exception("Empty Table Name");
+            echo $e->getTraceAsString();
+            throw $e;
+        }
+        
+        $columnList = implode(', ', $tableMetaData->getColumns());
+        
+        $primaryKeys = $tableMetaData->getPrimaryKeys();
+        if (count($primaryKeys)) {
+            $orderBy = 'ORDER BY ' . implode(' ASC, ', $primaryKeys) . ' ASC';
+        } else {
+            $orderBy = '';
+        }
+        
+        return "SELECT {$columnList} FROM {$tableMetaData->getTableName()} {$orderBy}";
+    }
+
+    /**
+     * Creates an iterator over the tables in the data set. If $reverse is 
+     * true a reverse iterator will be returned.
+     *
+     * @param bool $reverse
+     * @return PHPUnit_Extensions_Database_DB_TableIterator
+     */
+    protected function createIterator($reverse = false)
+    {
+        return new PHPUnit_Extensions_Database_DB_TableIterator($this->getTableNames(), $this, $reverse);
+    }
+
+    /**
+     * Returns a table object for the given table.
+     *
+     * @param string $tableName
+     * @return PHPUnit_Extensions_Database_DB_Table
+     */
+    public function getTable($tableName)
+    {
+        if (!in_array($tableName, $this->getTableNames())) {
+            throw new InvalidArgumentException("$tableName is not a table in the current database.");
+        }
+        
+        if (empty($this->tables[$tableName])) {
+            $this->tables[$tableName] = new PHPUnit_Extensions_Database_DB_Table($this->getTableMetaData($tableName), $this->databaseConnection);
+        }
+        
+        return $this->tables[$tableName];
+    }
+
+    /**
+     * Returns a table meta data object for the given table.
+     *
+     * @param string $tableName
+     * @return PHPUnit_Extensions_Database_DataSet_DefaultTableMetaData
+     */
+    public function getTableMetaData($tableName)
+    {
+        return new PHPUnit_Extensions_Database_DataSet_DefaultTableMetaData($tableName, $this->databaseConnection->getMetaData()->getTableColumns($tableName), $this->databaseConnection->getMetaData()->getTablePrimaryKeys($tableName));
+    }
+
+    /**
+     * Returns a list of table names for the database
+     * 
+     * @return Array
+     */
+    public function getTableNames()
+    {
+        return $this->databaseConnection->getMetaData()->getTableNames();
+    }
+}
+?>

Added: incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DB/DefaultDatabaseConnection.php
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DB/DefaultDatabaseConnection.php?rev=681982&view=auto
==============================================================================
--- incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DB/DefaultDatabaseConnection.php (added)
+++ incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DB/DefaultDatabaseConnection.php Sat Aug  2 07:11:35 2008
@@ -0,0 +1,214 @@
+<?php
+/**
+ * PHPUnit
+ *
+ * Copyright (c) 2002-2008, Sebastian Bergmann <sb...@sebastian-bergmann.de>.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *   * Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *   * Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in
+ *     the documentation and/or other materials provided with the
+ *     distribution.
+ *
+ *   * Neither the name of Sebastian Bergmann nor the names of his
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * @category   Testing
+ * @package    PHPUnit
+ * @author     Mike Lively <m...@digitalsandwich.com>
+ * @copyright  2002-2008 Sebastian Bergmann <sb...@sebastian-bergmann.de>
+ * @license    http://www.opensource.org/licenses/bsd-license.php  BSD License
+ * @version    SVN: $Id:DefaultDatabaseConnection.php 1254 2008-09-02 04:36:15Z mlively $
+ * @link       http://www.phpunit.de/
+ * @since      File available since Release 3.2.0
+ */
+
+require_once 'PHPUnit/Framework.php';
+require_once 'PHPUnit/Util/Filter.php';
+
+require_once 'PHPUnit/Extensions/Database/DB/IDatabaseConnection.php';
+require_once 'PHPUnit/Extensions/Database/DB/MetaData.php';
+require_once 'PHPUnit/Extensions/Database/DB/ResultSetTable.php';
+require_once 'PHPUnit/Extensions/Database/DB/DataSet.php';
+require_once 'PHPUnit/Extensions/Database/DB/FilteredDataSet.php';
+
+PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
+
+/**
+ * Provides a basic interface for communicating with a database.
+ *
+ * @category   Testing
+ * @package    PHPUnit
+ * @author     Mike Lively <m...@digitalsandwich.com>
+ * @copyright  2008 Mike Lively <m...@digitalsandwich.com>
+ * @license    http://www.opensource.org/licenses/bsd-license.php  BSD License
+ * @version    Release: 3.2.9
+ * @link       http://www.phpunit.de/
+ * @since      Class available since Release 3.2.0
+ */
+class PHPUnit_Extensions_Database_DB_DefaultDatabaseConnection implements PHPUnit_Extensions_Database_DB_IDatabaseConnection
+{
+
+    /**
+     * @var PDO
+     */
+    protected $connection;
+
+    /**
+     * @var string
+     */
+    protected $schema;
+
+    /**
+     * The metadata object used to retrieve table meta data from the database.
+     * 
+     * @var PHPUnit_Extensions_Database_DB_IMetaData
+     */
+    protected $metaData;
+
+    /**
+     * Creates a new database connection
+     *
+     * @param PDO $connection
+     * @param string $schema - The name of the database schema you will be testing against.
+     */
+    public function __construct(PDO $connection, $schema)
+    {
+        $this->connection = $connection;
+        $this->metaData = PHPUnit_Extensions_Database_DB_MetaData::createMetaData($connection, $schema);
+        $this->schema = $schema;
+        
+        $connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
+    }
+
+    /**
+     * Close this connection.
+     */
+    public function close()
+    {
+        unset($this->connection);
+    }
+
+    /**
+     * Returns a database metadata object that can be used to retrieve table 
+     * meta data from the database.
+     *
+     * @return PHPUnit_Extensions_Database_DB_IMetaData
+     */
+    public function getMetaData()
+    {
+        return $this->metaData;
+    }
+
+    /**
+     * Returns the schema for the connection.
+     *
+     * @return string
+     */
+    public function getSchema()
+    {
+        return $this->schema;
+    }
+
+    /**
+     * Creates a dataset containing the specified table names. If no table 
+     * names are specified then it will created a dataset over the entire 
+     * database.
+     *
+     * @param array $tableNames
+     * @return PHPUnit_Extensions_Database_DataSet_IDataSet
+     * @todo Implement the filtered data set.
+     */
+    public function createDataSet(Array $tableNames = null)
+    {
+        if (empty($tableNames)) {
+            return new PHPUnit_Extensions_Database_DB_DataSet($this);
+        } else {
+            return new PHPUnit_Extensions_Database_DB_FilteredDataSet($this, $tableNames);
+        }
+    }
+
+    /**
+     * Creates a table with the result of the specified SQL statement.
+     *
+     * @param string $resultName
+     * @param string $sql
+     * @return PHPUnit_Extensions_Database_DB_Table
+     */
+    public function createQueryTable($resultName, $sql)
+    {
+        $statement = $this->connection->query($sql);
+        return new PHPUnit_Extensions_Database_DB_ResultSetTable($resultName, $statement);
+    }
+
+    /**
+     * Returns this connection database configuration 
+     *
+     * @return PHPUnit_Extensions_Database_Database_DatabaseConfig
+     */
+    public function getConfig()
+    {
+    
+    }
+
+    /**
+     * Returns a PDO Connection
+     *
+     * @return PDO
+     */
+    public function getConnection()
+    {
+        return $this->connection;
+    }
+
+    /**
+     * Returns the number of rows in the given table. You can specify an 
+     * optional where clause to return a subset of the table.
+     *
+     * @param string $tableName
+     * @param string $whereClause
+     * @param int
+     */
+    public function getRowCount($tableName, $whereClause = null)
+    {
+        $query = "SELECT COUNT(*) FROM {$tableName}";
+        
+        if (isset($whereClause)) {
+            $query .= " WHERE {$whereClause}";
+        }
+    }
+
+    /**
+     * Returns a quoted schema object. (table name, column name, etc)
+     *
+     * @param string $object
+     * @return string
+     */
+    public function quoteSchemaObject($object)
+    {
+    	return $this->getMetaData()->quoteSchemaObject($object);
+    }
+
+}
+?>

Added: incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DB/FilteredDataSet.php
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DB/FilteredDataSet.php?rev=681982&view=auto
==============================================================================
--- incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DB/FilteredDataSet.php (added)
+++ incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DB/FilteredDataSet.php Sat Aug  2 07:11:35 2008
@@ -0,0 +1,95 @@
+<?php
+/**
+ * PHPUnit
+ *
+ * Copyright (c) 2002-2008, Sebastian Bergmann <sb...@sebastian-bergmann.de>.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *   * Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *   * Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in
+ *     the documentation and/or other materials provided with the
+ *     distribution.
+ *
+ *   * Neither the name of Sebastian Bergmann nor the names of his
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * @category   Testing
+ * @package    PHPUnit
+ * @author     Mike Lively <m...@digitalsandwich.com>
+ * @copyright  2002-2008 Sebastian Bergmann <sb...@sebastian-bergmann.de>
+ * @license    http://www.opensource.org/licenses/bsd-license.php  BSD License
+ * @version    SVN: $Id:FilteredDataSet.php 1254 2008-09-02 04:36:15Z mlively $
+ * @link       http://www.phpunit.de/
+ * @since      File available since Release 3.2.0
+ */
+
+require_once 'PHPUnit/Framework.php';
+require_once 'PHPUnit/Util/Filter.php';
+
+require_once 'PHPUnit/Extensions/Database/DB/DataSet.php';
+
+PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
+
+/**
+ * Provides access to a database instance as a data set.
+ *
+ * @category   Testing
+ * @package    PHPUnit
+ * @author     Mike Lively <m...@digitalsandwich.com>
+ * @copyright  2008 Mike Lively <m...@digitalsandwich.com>
+ * @license    http://www.opensource.org/licenses/bsd-license.php  BSD License
+ * @version    Release: 3.2.9
+ * @link       http://www.phpunit.de/
+ * @since      Class available since Release 3.2.0
+ */
+class PHPUnit_Extensions_Database_DB_FilteredDataSet extends PHPUnit_Extensions_Database_DB_DataSet
+{
+
+    /**
+     * @var Array
+     */
+    protected $tableNames;
+
+    /**
+     * Creates a new dataset using the given database connection.
+     *
+     * @param PHPUnit_Extensions_Database_DB_DefaultDatabaseConnection $databaseConnection
+     */
+    public function __construct(PHPUnit_Extensions_Database_DB_DefaultDatabaseConnection $databaseConnection, Array $tableNames)
+    {
+        parent::__construct($databaseConnection);
+        $this->tableNames = $tableNames;
+    }
+
+    /**
+     * Returns a list of table names for the database
+     * 
+     * @return Array
+     */
+    public function getTableNames()
+    {
+        return $this->tableNames;
+    }
+}
+?>

Added: incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DB/IDatabaseConnection.php
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DB/IDatabaseConnection.php?rev=681982&view=auto
==============================================================================
--- incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DB/IDatabaseConnection.php (added)
+++ incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DB/IDatabaseConnection.php Sat Aug  2 07:11:35 2008
@@ -0,0 +1,123 @@
+<?php
+/**
+ * PHPUnit
+ *
+ * Copyright (c) 2002-2008, Sebastian Bergmann <sb...@sebastian-bergmann.de>.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *   * Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *   * Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in
+ *     the documentation and/or other materials provided with the
+ *     distribution.
+ *
+ *   * Neither the name of Sebastian Bergmann nor the names of his
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * @category   Testing
+ * @package    PHPUnit
+ * @author     Mike Lively <m...@digitalsandwich.com>
+ * @copyright  2002-2008 Sebastian Bergmann <sb...@sebastian-bergmann.de>
+ * @license    http://www.opensource.org/licenses/bsd-license.php  BSD License
+ * @version    SVN: $Id: IDatabaseConnection.php 2165 2008-01-17 16:04:38Z sb $
+ * @link       http://www.phpunit.de/
+ * @since      File available since Release 3.2.0
+ */
+
+require_once 'PHPUnit/Framework.php';
+require_once 'PHPUnit/Util/Filter.php';
+
+PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
+
+/**
+ * Provides a basic interface for communicating with a database.
+ *
+ * @category   Testing
+ * @package    PHPUnit
+ * @author     Mike Lively <m...@digitalsandwich.com>
+ * @copyright  2008 Mike Lively <m...@digitalsandwich.com>
+ * @license    http://www.opensource.org/licenses/bsd-license.php  BSD License
+ * @version    Release: 3.2.9
+ * @link       http://www.phpunit.de/
+ * @since      Class available since Release 3.2.0
+ */
+interface PHPUnit_Extensions_Database_DB_IDatabaseConnection
+{
+
+    /**
+     * Close this connection.
+     */
+    public function close();
+
+    /**
+     * Creates a dataset containing the specified table names. If no table 
+     * names are specified then it will created a dataset over the entire 
+     * database.
+     *
+     * @param array $tableNames
+     * @return PHPUnit_Extensions_Database_DataSet_IDataSet
+     */
+    public function createDataSet(Array $tableNames = null);
+
+    /**
+     * Creates a table with the result of the specified SQL statement.
+     *
+     * @param string $resultName
+     * @param string $sql
+     * @return PHPUnit_Extensions_Database_DataSet_ITable
+     */
+    public function createQueryTable($resultName, $sql);
+
+    /**
+     * Returns a PDO Connection
+     *
+     * @return PDO
+     */
+    public function getConnection();
+
+    /**
+     * Returns the number of rows in the given table. You can specify an 
+     * optional where clause to return a subset of the table.
+     *
+     * @param string $tableName
+     * @param string $whereClause
+     * @param int
+     */
+    public function getRowCount($tableName, $whereClause = null);
+
+    /**
+     * Returns the schema for the connection.
+     *
+     * @return string
+     */
+    public function getSchema();
+
+    /**
+     * Returns a quoted schema object. (table name, column name, etc)
+     *
+     * @param string $object
+     * @return string
+     */
+    public function quoteSchemaObject($object);
+}
+?>

Added: incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DB/IMetaData.php
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DB/IMetaData.php?rev=681982&view=auto
==============================================================================
--- incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DB/IMetaData.php (added)
+++ incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DB/IMetaData.php Sat Aug  2 07:11:35 2008
@@ -0,0 +1,108 @@
+<?php
+/**
+ * PHPUnit
+ *
+ * Copyright (c) 2002-2008, Sebastian Bergmann <sb...@sebastian-bergmann.de>.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *   * Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *   * Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in
+ *     the documentation and/or other materials provided with the
+ *     distribution.
+ *
+ *   * Neither the name of Sebastian Bergmann nor the names of his
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * @category   Testing
+ * @package    PHPUnit
+ * @author     Mike Lively <m...@digitalsandwich.com>
+ * @copyright  2002-2008 Sebastian Bergmann <sb...@sebastian-bergmann.de>
+ * @license    http://www.opensource.org/licenses/bsd-license.php  BSD License
+ * @version    SVN: $Id: IMetaData.php 1985 2007-12-26 18:11:55Z sb $
+ * @link       http://www.phpunit.de/
+ * @since      File available since Release 3.2.0
+ */
+
+require_once 'PHPUnit/Framework.php';
+require_once 'PHPUnit/Util/Filter.php';
+
+PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
+
+/**
+ * Provides a basic interface for retreiving metadata from a database.
+ *
+ * @category   Testing
+ * @package    PHPUnit
+ * @author     Mike Lively <m...@digitalsandwich.com>
+ * @copyright  2008 Mike Lively <m...@digitalsandwich.com>
+ * @license    http://www.opensource.org/licenses/bsd-license.php  BSD License
+ * @version    Release: 3.2.9
+ * @link       http://www.phpunit.de/
+ * @since      Class available since Release 3.2.0
+ */
+interface PHPUnit_Extensions_Database_DB_IMetaData
+{
+
+    /**
+     * Returns an array containing the names of all the tables in the database.
+     *
+     * @return array
+     */
+    public function getTableNames();
+
+    /**
+     * Returns an array containing the names of all the columns in the 
+     * $tableName table,
+     *
+     * @param string $tableName
+     * @return array
+     */
+    public function getTableColumns($tableName);
+
+    /**
+     * Returns an array containing the names of all the primary key columns in 
+     * the $tableName table.
+     *
+     * @param string $tableName
+     * @return array
+     */
+    public function getTablePrimaryKeys($tableName);
+
+    /**
+     * Returns the name of the default schema.
+     * 
+     * @return string
+     */
+    public function getSchema();
+
+    /**
+     * Returns a quoted schema object. (table name, column name, etc)
+     *
+     * @param string $object
+     * @return string
+     */
+    public function quoteSchemaObject($object);
+
+}
+?>

Added: incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DB/MetaData.php
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DB/MetaData.php?rev=681982&view=auto
==============================================================================
--- incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DB/MetaData.php (added)
+++ incubator/shindig/trunk/php/external/PHPUnit/Extensions/Database/DB/MetaData.php Sat Aug  2 07:11:35 2008
@@ -0,0 +1,189 @@
+<?php
+/**
+ * PHPUnit
+ *
+ * Copyright (c) 2002-2008, Sebastian Bergmann <sb...@sebastian-bergmann.de>.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *   * Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *   * Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in
+ *     the documentation and/or other materials provided with the
+ *     distribution.
+ *
+ *   * Neither the name of Sebastian Bergmann nor the names of his
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * @category   Testing
+ * @package    PHPUnit
+ * @author     Mike Lively <m...@digitalsandwich.com>
+ * @copyright  2002-2008 Sebastian Bergmann <sb...@sebastian-bergmann.de>
+ * @license    http://www.opensource.org/licenses/bsd-license.php  BSD License
+ * @version    SVN: $Id:MetaData.php 1254 2008-09-02 04:36:15Z mlively $
+ * @link       http://www.phpunit.de/
+ * @since      File available since Release 3.2.0
+ */
+
+require_once 'PHPUnit/Framework.php';
+require_once 'PHPUnit/Util/Filter.php';
+require_once 'PHPUnit/Extensions/Database/DB/IMetaData.php';
+
+PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
+
+/**
+ * Provides a basic constructor for all meta data classes and a factory for 
+ * generating the appropriate meta data class.
+ *
+ * @category   Testing
+ * @package    PHPUnit
+ * @author     Mike Lively <m...@digitalsandwich.com>
+ * @copyright  2008 Mike Lively <m...@digitalsandwich.com>
+ * @license    http://www.opensource.org/licenses/bsd-license.php  BSD License
+ * @version    Release: 3.2.9
+ * @link       http://www.phpunit.de/
+ * @since      Class available since Release 3.2.0
+ */
+abstract class PHPUnit_Extensions_Database_DB_MetaData implements PHPUnit_Extensions_Database_DB_IMetaData
+{
+    protected static $metaDataClassMap = array(
+        'mysql'  => 'PHPUnit_Extensions_Database_DB_MetaData_MySQL',
+        'oci'    => 'PHPUnit_Extensions_Database_DB_MetaData_Oci',
+        'sqlite' => 'PHPUnit_Extensions_Database_DB_MetaData_Sqlite'
+    );
+
+    /**
+     * The PDO connection used to retreive database meta data
+     * 
+     * @var PDO
+     */
+    protected $pdo;
+
+    /**
+     * The default schema name for the meta data object.
+     * 
+     * @var string
+     */
+    protected $schema;
+
+    /**
+     * The character used to quote schema objects.
+     */
+    protected $schemaObjectQuoteChar = '"';
+
+    /**
+     * Creates a new database meta data object using the given pdo connection 
+     * and schema name.
+     *
+     * @param PDO $pdo
+     * @param string $schema
+     */
+    public final function __construct(PDO $pdo, $schema)
+    {
+        $this->pdo = $pdo;
+        $this->schema = $schema;
+    }
+
+    /**
+     * Creates a meta data object based on the driver of given $pdo object and 
+     * $schema name.
+     *
+     * @param PDO $pdo
+     * @param string $schema
+     * @return PHPUnit_Extensions_Database_DB_MetaData
+     */
+    public static function createMetaData(PDO $pdo, $schema)
+    {
+        $driverName = $pdo->getAttribute(PDO::ATTR_DRIVER_NAME);
+        if (isset(self::$metaDataClassMap[$driverName])) {
+            $className = self::$metaDataClassMap[$driverName];
+            
+            if ($className instanceof ReflectionClass) {
+                return $className->newInstance($pdo, $schema);
+            } else {
+                return self::registerClassWithDriver($className, $driverName)->newInstance($pdo, $schema);
+            }
+        } else {
+            throw new Exception("Could not find a meta data driver for {$driverName} pdo driver.");
+        }
+    }
+
+    /**
+     * Validates and registers the given $className with the given $pdoDriver. 
+     * It should be noted that this function will not attempt to include / 
+     * require the file. The $pdoDriver can be determined by the value of the 
+     * PDO::ATTR_DRIVER_NAME attribute for a pdo object.
+     * 
+     * A reflection of the $className is returned.
+     *
+     * @param string $className
+     * @param string $pdoDriver
+     * @return ReflectionClass
+     */
+    public static function registerClassWithDriver($className, $pdoDriver)
+    {
+        if (!class_exists($className)) {
+            throw new Exception("Specified class for {$pdoDriver} driver ({$className}) does not exist.");
+        }
+        
+        $reflection = new ReflectionClass($className);
+        if ($reflection->isSubclassOf('PHPUnit_Extensions_Database_DB_MetaData')) {
+            return self::$metaDataClassMap[$pdoDriver] = $reflection;
+        } else {
+            throw new Exception("Specified class for {$pdoDriver} driver ({$className}) does not extend PHPUnit_Extensions_Database_DB_MetaData.");
+        }
+    }
+
+    /**
+     * Returns the schema for the connection.
+     *
+     * @return string
+     */
+    public function getSchema()
+    {
+        return $this->schema;
+    }
+
+    /**
+     * Returns a quoted schema object. (table name, column name, etc)
+     *
+     * @param string $object
+     * @return string
+     */
+    public function quoteSchemaObject($object)
+    {
+    	return $this->schemaObjectQuoteChar.
+		str_replace($this->schemaObjectQuoteChar, $this->schemaObjectQuoteChar.$this->schemaObjectQuoteChar, $object).
+		$this->schemaObjectQuoteChar;
+    }
+}
+
+/**
+ * I am not sure why these requires can't go above the class, but when they do 
+ * the classes can't find the PHPUnit_Extensions_Database_DB_MetaData 
+ * class.
+ */
+require_once 'PHPUnit/Extensions/Database/DB/MetaData/Sqlite.php';
+require_once 'PHPUnit/Extensions/Database/DB/MetaData/InformationSchema.php';
+require_once 'PHPUnit/Extensions/Database/DB/MetaData/MySQL.php';
+
+?>



Re: svn commit: r681982 [1/27] - in /incubator/shindig/trunk/php: external/ external/PHPUnit/ external/PHPUnit/Extensions/ external/PHPUnit/Extensions/Database/ external/PHPUnit/Extensions/Database/Constraint/ external/PHPUnit/Extensions/Database/DB/ exter...

Posted by Chris Chabot <ch...@xs4all.nl>.
Ps sorry for the 27 part commit spam ... can't wait for PHP 5.3 to be  
finished and deployed in the wild so we can use a single .phar file  
instead of having to pull in the source directly :)



On Aug 2, 2008, at 4:11 PM, chabotc@apache.org wrote:

> Author: chabotc
> Date: Sat Aug  2 07:11:35 2008
> New Revision: 681982
>
> URL: http://svn.apache.org/viewvc?rev=681982&view=rev
> Log:
> Adds a working unit test suite to PHP Shindig.
>
> To run the tests (we currently have 86 tests), hit:
> 	http://<YourShindig>/test/
>
> Code coverage is still a bit lacking, but now that we have a working
> test envirioment i hope this will grown quickly.
>
> Note: PHPUnit and some versions of ZendPlatform and/or APC are known  
> to
>      cause the test suite not to run and throw some class errors.
>      The only work-around i currently have is to disable apc/ 
> zendplatform
>      if this happens to you.
>