Merge pull request #1009 from doctrine/feature/hhvm-tests
HHVM compatibility
This commit is contained in:
commit
54d9f05e39
@ -27,8 +27,6 @@ after_script:
|
||||
- php vendor/bin/coveralls -v
|
||||
|
||||
matrix:
|
||||
allow_failures:
|
||||
- php: hhvm
|
||||
exclude:
|
||||
- php: hhvm
|
||||
env: DB=pgsql # driver currently unsupported by HHVM
|
||||
|
@ -2,6 +2,8 @@
|
||||
|
||||
namespace Doctrine\Tests\ORM\Functional\Ticket;
|
||||
|
||||
use Doctrine\ORM\Tools\ToolsException;
|
||||
|
||||
/**
|
||||
* @group DDC-2862
|
||||
* @group DDC-2183
|
||||
@ -18,8 +20,7 @@ class DDC2862Test extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
$this->_em->getClassMetadata(DDC2862User::CLASSNAME),
|
||||
$this->_em->getClassMetadata(DDC2862Driver::CLASSNAME),
|
||||
));
|
||||
} catch (\Doctrine\ORM\Tools\ToolsException $exc) {
|
||||
$this->assertInstanceOf('Doctrine\DBAL\Exception\TableExistsException', $exc->getPrevious());
|
||||
} catch (ToolsException $exc) {
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
namespace Doctrine\Tests\ORM\Functional\Ticket;
|
||||
|
||||
use Doctrine\Common\Cache\FilesystemCache;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
|
||||
/**
|
||||
@ -9,27 +10,19 @@ use Doctrine\Common\Collections\ArrayCollection;
|
||||
*/
|
||||
class DDC742Test extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
{
|
||||
private $userCm;
|
||||
private $commentCm;
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
if (\extension_loaded('memcache') && @fsockopen('localhost', 11211)) {
|
||||
$memcache = new \Memcache();
|
||||
$memcache->addServer('localhost');
|
||||
$memcache->flush();
|
||||
$testDir = sys_get_temp_dir() . '/DDC742Test' . uniqid();
|
||||
|
||||
$cacheDriver = new \Doctrine\Common\Cache\MemcacheCache();
|
||||
$cacheDriver->setMemcache($memcache);
|
||||
mkdir($testDir);
|
||||
|
||||
$this->_em->getMetadataFactory()->setCacheDriver($cacheDriver);
|
||||
} else if (\extension_loaded('apc')) {
|
||||
$this->_em->getMetadataFactory()->setCacheDriver(new \Doctrine\Common\Cache\ApcCache());
|
||||
} else {
|
||||
$this->markTestSkipped('Test only works with a cache enabled.');
|
||||
}
|
||||
// using a Filesystemcache to ensure that the cached data is serialized
|
||||
$this->_em->getMetadataFactory()->setCacheDriver(new FilesystemCache($testDir));
|
||||
|
||||
try {
|
||||
$this->_schemaTool->createSchema(array(
|
||||
@ -37,7 +30,6 @@ class DDC742Test extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
$this->_em->getClassMetadata(__NAMESPACE__ . '\DDC742Comment')
|
||||
));
|
||||
} catch(\Exception $e) {
|
||||
|
||||
}
|
||||
|
||||
// make sure classes will be deserialized from caches
|
||||
|
Loading…
x
Reference in New Issue
Block a user