[2.0] Making use of new constant __DIR__
This commit is contained in:
parent
9a55035883
commit
0ac97e7adf
@ -10,7 +10,7 @@
|
|||||||
*
|
*
|
||||||
* @since 2.0
|
* @since 2.0
|
||||||
*/
|
*/
|
||||||
class Doctrine_ORM_ActiveEntity extends Doctrine_Common_VirtualPropertyObject implements Doctrine_ORM_Entity
|
class Doctrine_ORM_ActiveEntity
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* The class descriptor.
|
* The class descriptor.
|
||||||
|
@ -44,10 +44,21 @@ class Configuration extends \Doctrine\DBAL\Configuration
|
|||||||
'resultCacheImpl' => null,
|
'resultCacheImpl' => null,
|
||||||
'queryCacheImpl' => null,
|
'queryCacheImpl' => null,
|
||||||
'metadataCacheImpl' => null,
|
'metadataCacheImpl' => null,
|
||||||
'metadataDriverImpl' => new AnnotationDriver()
|
'metadataDriverImpl' => new AnnotationDriver(),
|
||||||
|
'automaticDirtyChecking' => true
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function setAutomaticDirtyChecking($bool)
|
||||||
|
{
|
||||||
|
$this->_attributes['automaticDirtyChecking'] = $bool;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getAutomaticDirtyChecking()
|
||||||
|
{
|
||||||
|
return $this->_attributes['automaticDirtyChecking'];
|
||||||
|
}
|
||||||
|
|
||||||
public function setMetadataDriverImpl($driverImpl)
|
public function setMetadataDriverImpl($driverImpl)
|
||||||
{
|
{
|
||||||
$this->_attributes['metadataDriverImpl'] = $driverImpl;
|
$this->_attributes['metadataDriverImpl'] = $driverImpl;
|
||||||
|
@ -262,6 +262,8 @@ class UnitOfWork
|
|||||||
foreach ($entities as $entity) {
|
foreach ($entities as $entity) {
|
||||||
$entitySet[get_class($entity)][] = $entity;
|
$entitySet[get_class($entity)][] = $entity;
|
||||||
}
|
}
|
||||||
|
} else if ( ! $this->_em->getConfiguration()->getAutomaticDirtyChecking()) {
|
||||||
|
//TODO
|
||||||
} else {
|
} else {
|
||||||
$entitySet = $this->_identityMap;
|
$entitySet = $this->_identityMap;
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@ if (!defined('PHPUnit_MAIN_METHOD')) {
|
|||||||
define('PHPUnit_MAIN_METHOD', 'AllTests::main');
|
define('PHPUnit_MAIN_METHOD', 'AllTests::main');
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once dirname(__FILE__) . '/TestInit.php';
|
require_once __DIR__ . '/TestInit.php';
|
||||||
|
|
||||||
// Suites
|
// Suites
|
||||||
#require_once 'Common/AllTests.php';
|
#require_once 'Common/AllTests.php';
|
||||||
|
@ -8,7 +8,7 @@ if (!defined('PHPUnit_MAIN_METHOD')) {
|
|||||||
define('PHPUnit_MAIN_METHOD', 'Common_AllTests::main');
|
define('PHPUnit_MAIN_METHOD', 'Common_AllTests::main');
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once dirname(__FILE__) . '/../TestInit.php';
|
require_once __DIR__ . '/../TestInit.php';
|
||||||
|
|
||||||
// Suites
|
// Suites
|
||||||
#require_once 'Common/Collections/AllTests.php';
|
#require_once 'Common/Collections/AllTests.php';
|
||||||
|
@ -6,7 +6,7 @@ if (!defined('PHPUnit_MAIN_METHOD')) {
|
|||||||
define('PHPUnit_MAIN_METHOD', 'Common_Collections_AllTests::main');
|
define('PHPUnit_MAIN_METHOD', 'Common_Collections_AllTests::main');
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once dirname(__FILE__) . '/../../TestInit.php';
|
require_once __DIR__ . '/../../TestInit.php';
|
||||||
|
|
||||||
// Tests
|
// Tests
|
||||||
#require_once 'Common/Collections/CollectionTest.php';
|
#require_once 'Common/Collections/CollectionTest.php';
|
||||||
|
@ -4,7 +4,7 @@ namespace Doctrine\Tests\Common\Collections;
|
|||||||
|
|
||||||
use Doctrine\Tests;
|
use Doctrine\Tests;
|
||||||
|
|
||||||
require_once dirname(__FILE__) . '/../../TestInit.php';
|
require_once __DIR__ . '/../../TestInit.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Collection tests.
|
* Collection tests.
|
||||||
|
@ -9,7 +9,7 @@ if (!defined('PHPUnit_MAIN_METHOD')) {
|
|||||||
define('PHPUnit_MAIN_METHOD', 'Dbal_AllTests::main');
|
define('PHPUnit_MAIN_METHOD', 'Dbal_AllTests::main');
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once dirname(__FILE__) . '/../TestInit.php';
|
require_once __DIR__ . '/../TestInit.php';
|
||||||
|
|
||||||
// Suites
|
// Suites
|
||||||
#require_once 'Dbal/Component/AllTests.php';
|
#require_once 'Dbal/Component/AllTests.php';
|
||||||
|
@ -6,7 +6,7 @@ if (!defined('PHPUnit_MAIN_METHOD')) {
|
|||||||
define('PHPUnit_MAIN_METHOD', 'Dbal_Component_AllTests::main');
|
define('PHPUnit_MAIN_METHOD', 'Dbal_Component_AllTests::main');
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once dirname(__FILE__) . '/../../TestInit.php';
|
require_once __DIR__ . '/../../TestInit.php';
|
||||||
|
|
||||||
// Tests
|
// Tests
|
||||||
#require_once 'Dbal/Component/TestTest.php';
|
#require_once 'Dbal/Component/TestTest.php';
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace Doctrine\Tests\DBAL\Component;
|
namespace Doctrine\Tests\DBAL\Component;
|
||||||
|
|
||||||
require_once dirname(__FILE__) . '/../../TestInit.php';
|
require_once __DIR__ . '/../../TestInit.php';
|
||||||
|
|
||||||
class TestTest extends \Doctrine\Tests\DbalTestCase
|
class TestTest extends \Doctrine\Tests\DbalTestCase
|
||||||
{
|
{
|
||||||
|
@ -6,7 +6,7 @@ if (!defined('PHPUnit_MAIN_METHOD')) {
|
|||||||
define('PHPUnit_MAIN_METHOD', 'Ticket_AllTests::main');
|
define('PHPUnit_MAIN_METHOD', 'Ticket_AllTests::main');
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once dirname(__FILE__) . '/../../TestInit.php';
|
require_once __DIR__ . '/../../TestInit.php';
|
||||||
|
|
||||||
// Tests
|
// Tests
|
||||||
#require_once 'Dbal/Ticket/1Test.php';
|
#require_once 'Dbal/Ticket/1Test.php';
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace Doctrine\Tests\DBAL\Ticket;
|
namespace Doctrine\Tests\DBAL\Ticket;
|
||||||
|
|
||||||
require_once dirname(__FILE__) . '/../../TestInit.php';
|
require_once __DIR__ . '/../../TestInit.php';
|
||||||
|
|
||||||
class Test1 extends \Doctrine\Tests\DbalTestCase
|
class Test1 extends \Doctrine\Tests\DbalTestCase
|
||||||
{
|
{
|
||||||
|
@ -15,7 +15,7 @@ if (!defined('PHPUnit_MAIN_METHOD')) {
|
|||||||
define('PHPUnit_MAIN_METHOD', 'Orm_AllTests::main');
|
define('PHPUnit_MAIN_METHOD', 'Orm_AllTests::main');
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once dirname(__FILE__) . '/../TestInit.php';
|
require_once __DIR__ . '/../TestInit.php';
|
||||||
|
|
||||||
class AllTests
|
class AllTests
|
||||||
{
|
{
|
||||||
|
@ -6,7 +6,7 @@ if (!defined('PHPUnit_MAIN_METHOD')) {
|
|||||||
define('PHPUnit_MAIN_METHOD', 'Orm_Associations_AllTests::main');
|
define('PHPUnit_MAIN_METHOD', 'Orm_Associations_AllTests::main');
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once dirname(__FILE__) . '/../../TestInit.php';
|
require_once __DIR__ . '/../../TestInit.php';
|
||||||
|
|
||||||
class AllTests
|
class AllTests
|
||||||
{
|
{
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace Doctrine\Tests\ORM\Associations;
|
namespace Doctrine\Tests\ORM\Associations;
|
||||||
|
|
||||||
require_once dirname(__FILE__) . '/../../TestInit.php';
|
require_once __DIR__ . '/../../TestInit.php';
|
||||||
|
|
||||||
class OneToOneMappingTest extends \Doctrine\Tests\OrmTestCase
|
class OneToOneMappingTest extends \Doctrine\Tests\OrmTestCase
|
||||||
{
|
{
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace Doctrine\Tests\ORM;
|
namespace Doctrine\Tests\ORM;
|
||||||
|
|
||||||
require_once dirname(__FILE__) . '/../TestInit.php';
|
require_once __DIR__ . '/../TestInit.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests of the commit order calculation.
|
* Tests of the commit order calculation.
|
||||||
|
@ -6,7 +6,7 @@ if (!defined('PHPUnit_MAIN_METHOD')) {
|
|||||||
define('PHPUnit_MAIN_METHOD', 'Orm_Entity_AllTests::main');
|
define('PHPUnit_MAIN_METHOD', 'Orm_Entity_AllTests::main');
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once dirname(__FILE__) . '/../../TestInit.php';
|
require_once __DIR__ . '/../../TestInit.php';
|
||||||
|
|
||||||
|
|
||||||
class AllTests
|
class AllTests
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace Doctrine\Tests\ORM\Entity;
|
namespace Doctrine\Tests\ORM\Entity;
|
||||||
|
|
||||||
require_once dirname(__FILE__) . '/../../TestInit.php';
|
require_once __DIR__ . '/../../TestInit.php';
|
||||||
|
|
||||||
class ConstructorTest extends \Doctrine\Tests\OrmTestCase
|
class ConstructorTest extends \Doctrine\Tests\OrmTestCase
|
||||||
{
|
{
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace Doctrine\Tests\ORM;
|
namespace Doctrine\Tests\ORM;
|
||||||
|
|
||||||
require_once dirname(__FILE__) . '/../TestInit.php';
|
require_once __DIR__ . '/../TestInit.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* EntityManager tests.
|
* EntityManager tests.
|
||||||
|
@ -10,7 +10,7 @@ use Doctrine\Tests\Mocks\SequenceMock;
|
|||||||
use Doctrine\Tests\Models\Forum\ForumUser;
|
use Doctrine\Tests\Models\Forum\ForumUser;
|
||||||
use Doctrine\Tests\Models\Forum\ForumAvatar;
|
use Doctrine\Tests\Models\Forum\ForumAvatar;
|
||||||
|
|
||||||
require_once dirname(__FILE__) . '/../TestInit.php';
|
require_once __DIR__ . '/../TestInit.php';
|
||||||
|
|
||||||
#require_once 'lib/mocks/Doctrine_EntityManagerMock.php';
|
#require_once 'lib/mocks/Doctrine_EntityManagerMock.php';
|
||||||
#require_once 'lib/mocks/Doctrine_ConnectionMock.php';
|
#require_once 'lib/mocks/Doctrine_ConnectionMock.php';
|
||||||
|
@ -6,7 +6,7 @@ if (!defined('PHPUnit_MAIN_METHOD')) {
|
|||||||
define('PHPUnit_MAIN_METHOD', 'Orm_Functional_AllTests::main');
|
define('PHPUnit_MAIN_METHOD', 'Orm_Functional_AllTests::main');
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once dirname(__FILE__) . '/../../TestInit.php';
|
require_once __DIR__ . '/../../TestInit.php';
|
||||||
|
|
||||||
class AllTests
|
class AllTests
|
||||||
{
|
{
|
||||||
|
@ -6,7 +6,7 @@ use Doctrine\ORM\Export\ClassExporter;
|
|||||||
use Doctrine\Tests\Models\CMS\CmsUser;
|
use Doctrine\Tests\Models\CMS\CmsUser;
|
||||||
use Doctrine\Tests\Models\CMS\CmsPhonenumber;
|
use Doctrine\Tests\Models\CMS\CmsPhonenumber;
|
||||||
|
|
||||||
require_once dirname(__FILE__) . '/../../TestInit.php';
|
require_once __DIR__ . '/../../TestInit.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Description of BasicCRUDTest
|
* Description of BasicCRUDTest
|
||||||
|
@ -6,7 +6,7 @@ if (!defined('PHPUnit_MAIN_METHOD')) {
|
|||||||
define('PHPUnit_MAIN_METHOD', 'Orm_Hydration_AllTests::main');
|
define('PHPUnit_MAIN_METHOD', 'Orm_Hydration_AllTests::main');
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once dirname(__FILE__) . '/../../TestInit.php';
|
require_once __DIR__ . '/../../TestInit.php';
|
||||||
|
|
||||||
|
|
||||||
class AllTests
|
class AllTests
|
||||||
|
@ -4,7 +4,7 @@ namespace Doctrine\Tests\ORM\Hydration;
|
|||||||
|
|
||||||
use Doctrine\Tests\Mocks\HydratorMockStatement;
|
use Doctrine\Tests\Mocks\HydratorMockStatement;
|
||||||
|
|
||||||
require_once dirname(__FILE__) . '/../../TestInit.php';
|
require_once __DIR__ . '/../../TestInit.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Description of ArrayHydratorTest
|
* Description of ArrayHydratorTest
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace Doctrine\Tests\ORM\Hydration;
|
namespace Doctrine\Tests\ORM\Hydration;
|
||||||
|
|
||||||
require_once dirname(__FILE__) . '/../../TestInit.php';
|
require_once __DIR__ . '/../../TestInit.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Description of HydrationTest
|
* Description of HydrationTest
|
||||||
|
@ -4,7 +4,7 @@ namespace Doctrine\Tests\ORM\Hydration;
|
|||||||
|
|
||||||
use Doctrine\Tests\Mocks\HydratorMockStatement;
|
use Doctrine\Tests\Mocks\HydratorMockStatement;
|
||||||
|
|
||||||
require_once dirname(__FILE__) . '/../../TestInit.php';
|
require_once __DIR__ . '/../../TestInit.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Description of ObjectHydratorTest
|
* Description of ObjectHydratorTest
|
||||||
|
@ -4,7 +4,7 @@ namespace Doctrine\Tests\ORM\Hydration;
|
|||||||
|
|
||||||
use Doctrine\Tests\Mocks\HydratorMockStatement;
|
use Doctrine\Tests\Mocks\HydratorMockStatement;
|
||||||
|
|
||||||
require_once dirname(__FILE__) . '/../../TestInit.php';
|
require_once __DIR__ . '/../../TestInit.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Description of ScalarHydratorTest
|
* Description of ScalarHydratorTest
|
||||||
|
@ -4,7 +4,7 @@ namespace Doctrine\Tests\ORM\Hydration;
|
|||||||
|
|
||||||
use Doctrine\Tests\Mocks\HydratorMockStatement;
|
use Doctrine\Tests\Mocks\HydratorMockStatement;
|
||||||
|
|
||||||
require_once dirname(__FILE__) . '/../../TestInit.php';
|
require_once __DIR__ . '/../../TestInit.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Description of SingleScalarHydratorTest
|
* Description of SingleScalarHydratorTest
|
||||||
|
@ -6,7 +6,7 @@ if (!defined('PHPUnit_MAIN_METHOD')) {
|
|||||||
define('PHPUnit_MAIN_METHOD', 'Orm_Mapping_AllTests::main');
|
define('PHPUnit_MAIN_METHOD', 'Orm_Mapping_AllTests::main');
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once dirname(__FILE__) . '/../../TestInit.php';
|
require_once __DIR__ . '/../../TestInit.php';
|
||||||
|
|
||||||
class AllTests
|
class AllTests
|
||||||
{
|
{
|
||||||
|
@ -10,7 +10,7 @@ use Doctrine\Tests\Mocks\MetadataDriverMock;
|
|||||||
use Doctrine\Tests\Mocks\DatabasePlatformMock;
|
use Doctrine\Tests\Mocks\DatabasePlatformMock;
|
||||||
use Doctrine\ORM\Mapping\ClassMetadata;
|
use Doctrine\ORM\Mapping\ClassMetadata;
|
||||||
|
|
||||||
require_once dirname(__FILE__) . '/../../TestInit.php';
|
require_once __DIR__ . '/../../TestInit.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Description of ClassMetadataFactoryTest
|
* Description of ClassMetadataFactoryTest
|
||||||
|
@ -4,7 +4,7 @@ namespace Doctrine\Tests\ORM\Mapping;
|
|||||||
|
|
||||||
use Doctrine\ORM\Mapping\ClassMetadata;
|
use Doctrine\ORM\Mapping\ClassMetadata;
|
||||||
|
|
||||||
require_once dirname(__FILE__) . '/../../TestInit.php';
|
require_once __DIR__ . '/../../TestInit.php';
|
||||||
|
|
||||||
class ClassMetadataTest extends \Doctrine\Tests\OrmTestCase
|
class ClassMetadataTest extends \Doctrine\Tests\OrmTestCase
|
||||||
{
|
{
|
||||||
|
@ -8,7 +8,7 @@ if (!defined('PHPUnit_MAIN_METHOD')) {
|
|||||||
define('PHPUnit_MAIN_METHOD', 'Orm_Query_AllTests::main');
|
define('PHPUnit_MAIN_METHOD', 'Orm_Query_AllTests::main');
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once dirname(__FILE__) . '/../../TestInit.php';
|
require_once __DIR__ . '/../../TestInit.php';
|
||||||
|
|
||||||
#require_once 'IdentifierRecognitionTest.php';
|
#require_once 'IdentifierRecognitionTest.php';
|
||||||
/*require_once 'ScannerTest.php';
|
/*require_once 'ScannerTest.php';
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
namespace Doctrine\Tests\ORM\Query;
|
namespace Doctrine\Tests\ORM\Query;
|
||||||
|
|
||||||
require_once dirname(__FILE__) . '/../../TestInit.php';
|
require_once __DIR__ . '/../../TestInit.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test case for testing the saving and referencing of query identifiers.
|
* Test case for testing the saving and referencing of query identifiers.
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
namespace Doctrine\Tests\ORM\Query;
|
namespace Doctrine\Tests\ORM\Query;
|
||||||
|
|
||||||
require_once dirname(__FILE__) . '/../../TestInit.php';
|
require_once __DIR__ . '/../../TestInit.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test case for testing the saving and referencing of query identifiers.
|
* Test case for testing the saving and referencing of query identifiers.
|
||||||
|
@ -11,7 +11,7 @@ use Doctrine\Tests\Mocks\IdentityIdGeneratorMock;
|
|||||||
use Doctrine\Tests\Models\Forum\ForumUser;
|
use Doctrine\Tests\Models\Forum\ForumUser;
|
||||||
use Doctrine\Tests\Models\Forum\ForumAvatar;
|
use Doctrine\Tests\Models\Forum\ForumAvatar;
|
||||||
|
|
||||||
require_once dirname(__FILE__) . '/../TestInit.php';
|
require_once __DIR__ . '/../TestInit.php';
|
||||||
|
|
||||||
#require_once 'lib/mocks/Doctrine_EntityManagerMock.php';
|
#require_once 'lib/mocks/Doctrine_EntityManagerMock.php';
|
||||||
#require_once 'lib/mocks/Doctrine_ConnectionMock.php';
|
#require_once 'lib/mocks/Doctrine_ConnectionMock.php';
|
||||||
|
@ -13,10 +13,10 @@ $classLoader = new \Doctrine\Common\ClassLoader();
|
|||||||
//$classLoader->setCheckFileExists(true);
|
//$classLoader->setCheckFileExists(true);
|
||||||
$classLoader->register();
|
$classLoader->register();
|
||||||
|
|
||||||
$modelDir = dirname(__FILE__) . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'models';
|
$modelDir = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'models';
|
||||||
set_include_path(
|
set_include_path(
|
||||||
get_include_path()
|
get_include_path()
|
||||||
. PATH_SEPARATOR . dirname(__FILE__) . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'lib'
|
. PATH_SEPARATOR . __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'lib'
|
||||||
. PATH_SEPARATOR . $modelDir . DIRECTORY_SEPARATOR . 'cms'
|
. PATH_SEPARATOR . $modelDir . DIRECTORY_SEPARATOR . 'cms'
|
||||||
. PATH_SEPARATOR . $modelDir . DIRECTORY_SEPARATOR . 'company'
|
. PATH_SEPARATOR . $modelDir . DIRECTORY_SEPARATOR . 'company'
|
||||||
. PATH_SEPARATOR . $modelDir . DIRECTORY_SEPARATOR . 'ecommerce'
|
. PATH_SEPARATOR . $modelDir . DIRECTORY_SEPARATOR . 'ecommerce'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user