He Folks,
dont know if anyone can help me here.
i used the sfPhpUnit2Plugin for integrating phpunit into symfony 1.4.
ich have a strange Problem with my phpunit Tests:
The TestFile:
<?php
require_once dirname(__FILE__).'/../bootstrap/unit.php';
class unit_FooTest extends sfPHPUnitBaseTestCase
{
public function testInValidData()
{
//test some things
}
public function _start()
{
new
sfDatabaseManager(ProjectConfiguration::getApplicationConfiguration('tms',
'test', true));
$con = Propel::getConnection();
}
public function _end(){
Propel::close();
}
}
If i run the test standalone, everything works fine, but if i run all
my tests in hudson, things are getting strange.
My phpunit.xml:
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
colors="false"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="true"
stopOnFailure="false"
syntaxCheck="false">
<filter>
<!-- -->
</filter>
<logging>
<log type="coverage-html" target="./doc/coverage" charset="UTF-8"
yui="true" highlight="true"
lowUpperBound="35" highLowerBound="70"/>
<log type="coverage-xml" target="./log/clover-report.xml"/>
<log type="test-xml" target="./log/phpunit-results.xml" />
</logging>
</phpunit>
Now if hudson trys to execute all tests, i get different errors
regarding PDO.
4) unit_FooTest::testInValidData
RuntimeException: PDOException: You cannot serialize or unserialize
PDO instances in /var/lib/hudson/jobs/Project/workspace/trunk/- on
line 28
i've read the phpunit documentation and found out that should have
todo with the option "backupGlobals" set to true, but mine is false.
I've tried different approaches, but nothing worked for me, has
anybody ran into the same behavior, and has a solution?
Why is the Propel Connection GLOBAL and why phpunit tried to serialize/
deserialize it, even when i explicitly close the connection.
I know Databases shouldnt be used in tests, but sometimes there is no
other way (e.g. testing Peer Classes)
Anybody?!?!?!
I really need a helping hand on this.
Cheerz
Robert
--
If you want to report a vulnerability issue on symfony, please send it to
security at symfony-project.com
You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en