Skip to content

Instantly share code, notes, and snippets.

@FabioBatSilva
Created March 15, 2013 20:20
Show Gist options
  • Save FabioBatSilva/5172825 to your computer and use it in GitHub Desktop.
Save FabioBatSilva/5172825 to your computer and use it in GitHub Desktop.
doctrine-phpunit.xml.xhprof
<?xml version="1.0" encoding="UTF-8"?>
<!--
Use this configuration file as a template to run the tests against any dbms.
Procedure:
1) Save a copy of this file with a name of your chosing. It doesn't matter
where you place it as long as you know where it is.
i.e. "mysqlconf.xml" (It needs the ending .xml).
2) Edit the file and fill in your settings (database name, type, username, etc.)
Just change the "value"s, not the names of the var elements.
3) To run the tests against the database type the following from within the
tests/ folder: phpunit -c <filename> ...
Example: phpunit -c mysqlconf.xml AllTests
-->
<phpunit backupGlobals="false" backupStaticAttributes="false" colors="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" syntaxCheck="false" bootstrap="./tests/Doctrine/Tests/TestInit.php">
<testsuites>
<testsuite name="Doctrine ORM Test Suite">
<directory>./tests/Doctrine/Tests/ORM</directory>
</testsuite>
</testsuites>
<listeners>
<listener class="PHPUnit_Util_Log_XHProf" file="PHPUnit/Util/Log/XHProf.php">
<arguments>
<array>
<element key="xhprofLibFile">
<string>/var/www/xhprof/xhprof_lib/utils/xhprof_lib.php</string>
</element>
<element key="xhprofRunsFile">
<string>/var/www/xhprof/xhprof_lib/utils/xhprof_runs.php</string>
</element>
<element key="xhprofWeb">
<string>http://localhost/xhprof/xhprof_html/index.php</string>
</element>
<element key="appNamespace">
<string>Doctrine2</string>
</element>
<element key="xhprofFlags">
<string>XHPROF_FLAGS_CPU,XHPROF_FLAGS_MEMORY</string>
</element>
<element key="xhprofIgnore">
<string>call_user_func,call_user_func_array</string>
</element>
</array>
</arguments>
</listener>
</listeners>
<groups>
<exclude>
<group>performance</group>
<group>locking_functional</group>
</exclude>
</groups>
<php>
<!-- "Real" test database -->
<!-- uncomment, otherwise sqlite memory runs
<var name="db_type" value="pdo_mysql"/>
<var name="db_host" value="localhost" />
<var name="db_username" value="root" />
<var name="db_password" value="" />
<var name="db_name" value="doctrine_tests" />
<var name="db_port" value="3306"/>-->
<!--<var name="db_event_subscribers" value="Doctrine\DBAL\Event\Listeners\OracleSessionInit">-->
<!-- Database for temporary connections (i.e. to drop/create the main database) -->
<var name="tmpdb_type" value="pdo_mysql" />
<var name="tmpdb_host" value="localhost" />
<var name="tmpdb_username" value="root" />
<var name="tmpdb_password" value="" />
<var name="tmpdb_name" value="doctrine_tests_tmp" />
<var name="tmpdb_port" value="3306" />
</php>
</phpunit>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment