1
0
mirror of synced 2024-12-05 03:06:05 +03:00

Fixed typos

This commit is contained in:
Pascal Borreli 2013-03-11 00:08:58 +00:00
parent 399584db4c
commit a2cd0f5804
77 changed files with 188 additions and 188 deletions

View File

@ -126,7 +126,7 @@ from 2.0 have to configure the annotation driver if they don't use `Configuratio
$config->setMetadataDriverImpl($driver); $config->setMetadataDriverImpl($driver);
## Scalar mappings can now be ommitted from DQL result ## Scalar mappings can now be omitted from DQL result
You are now allowed to mark scalar SELECT expressions as HIDDEN an they are not hydrated anymore. You are now allowed to mark scalar SELECT expressions as HIDDEN an they are not hydrated anymore.
Example: Example:
@ -307,7 +307,7 @@ them for batch updates like SchemaTool and other commands. However the
annotations driver being a default driver does not really help that much annotations driver being a default driver does not really help that much
anyways. anyways.
Therefore we decided to break backwards compability in this issue and drop Therefore we decided to break backwards compatibility in this issue and drop
the support for Annotations as Default Driver and require our users to the support for Annotations as Default Driver and require our users to
specify the driver explicitly (which allows us to ask for the path to all specify the driver explicitly (which allows us to ask for the path to all
entities). entities).
@ -366,7 +366,7 @@ apologize for the inconvenience.
## Default Property for Field Mappings ## Default Property for Field Mappings
The "default" option for database column defaults has been removed. If desired, database column defaults can The "default" option for database column defaults has been removed. If desired, database column defaults can
be implemented by using the columnDefinition attribute of the @Column annotation (or the approriate XML and YAML equivalents). be implemented by using the columnDefinition attribute of the @Column annotation (or the appropriate XML and YAML equivalents).
Prefer PHP default values, if possible. Prefer PHP default values, if possible.
## Selecting Partial Objects ## Selecting Partial Objects
@ -451,7 +451,7 @@ With new required method AbstractTask::buildDocumentation, its implementation de
* "doctrine schema-tool --drop" now always drops the complete database instead of * "doctrine schema-tool --drop" now always drops the complete database instead of
only those tables defined by the current database model. The previous method had only those tables defined by the current database model. The previous method had
problems when foreign keys of orphaned tables pointed to tables that were schedulded problems when foreign keys of orphaned tables pointed to tables that were scheduled
for deletion. for deletion.
* Use "doctrine schema-tool --update" to get a save incremental update for your * Use "doctrine schema-tool --update" to get a save incremental update for your
database schema without deleting any unused tables, sequences or foreign keys. database schema without deleting any unused tables, sequences or foreign keys.

View File

@ -64,5 +64,5 @@ object or implement the __sleep() magic method on your entity.
When you called detach on your objects they get "unmanaged" with that When you called detach on your objects they get "unmanaged" with that
entity manager. This means you cannot use them as part of write operations entity manager. This means you cannot use them as part of write operations
during ``EntityManagr#flush()`` anymore in this request. during ``EntityManager#flush()`` anymore in this request.

View File

@ -162,7 +162,7 @@ is supposed to kick-start you, but not towards 100%.
Why does the EntityGenerator not generate inheritance correctly? Why does the EntityGenerator not generate inheritance correctly?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Just from the details of the discriminator map the EntityGenerator cannot guess the inheritance hierachy. Just from the details of the discriminator map the EntityGenerator cannot guess the inheritance hierarchy.
This is why the generation of inherited entities does not fully work. You have to adjust some additional This is why the generation of inherited entities does not fully work. You have to adjust some additional
code to get this one working correctly. code to get this one working correctly.

View File

@ -689,7 +689,7 @@ interchangeably, independent of in-memory or sql-backed collections.
*/ */
public function setMaxResults($maxResults); public function setMaxResults($maxResults);
public function getOrderings(); public function getOrderings();
public function getWhereExpresion(); public function getWhereExpression();
public function getFirstResult(); public function getFirstResult();
public function getMaxResults(); public function getMaxResults();
} }

View File

@ -19,7 +19,7 @@ the ID fields have to have their values set before you call ``EntityManager#pers
Primitive Types only Primitive Types only
~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~
Even in version 2.0 you can have composite keys as long as they only consist of the primative types Even in version 2.0 you can have composite keys as long as they only consist of the primitive types
``integer`` and ``string``. Suppose you want to create a database of cars and use the model-name ``integer`` and ``string``. Suppose you want to create a database of cars and use the model-name
and year of production as primary keys: and year of production as primary keys:
@ -129,7 +129,7 @@ of one or many parent entities.
- Dynamic Attributes of an Entity (for example Article). Each Article has many - Dynamic Attributes of an Entity (for example Article). Each Article has many
attributes with primary key "article_id" and "attribute_name". attributes with primary key "article_id" and "attribute_name".
- Address object of a Person, the primary key of the adress is "user_id". This is not a case of a composite primary - Address object of a Person, the primary key of the address is "user_id". This is not a case of a composite primary
key, but the identity is derived through a foreign entity and a foreign key. key, but the identity is derived through a foreign entity and a foreign key.
- Join Tables with metadata can be modelled as Entity, for example connections between two articles - Join Tables with metadata can be modelled as Entity, for example connections between two articles
with a little description and a score. with a little description and a score.

View File

@ -386,7 +386,7 @@ abstract class AbstractQuery
} }
/** /**
* Defines a cache driver to be used for caching result sets and implictly enables caching. * Defines a cache driver to be used for caching result sets and implicitly enables caching.
* *
* @param \Doctrine\Common\Cache\Cache|null $resultCacheDriver Cache driver * @param \Doctrine\Common\Cache\Cache|null $resultCacheDriver Cache driver
* *

View File

@ -122,7 +122,7 @@ final class Events
/** /**
* The preFlush event occurs when the EntityManager#flush() operation is invoked, * The preFlush event occurs when the EntityManager#flush() operation is invoked,
* but before any changes to managed entites have been calculated. This event is * but before any changes to managed entities have been calculated. This event is
* always raised right after EntityManager#flush() call. * always raised right after EntityManager#flush() call.
*/ */
const preFlush = 'preFlush'; const preFlush = 'preFlush';

View File

@ -168,7 +168,7 @@ abstract class AbstractHydrator
} }
/** /**
* Excutes one-time preparation tasks, once each time hydration is started * Executes one-time preparation tasks, once each time hydration is started
* through {@link hydrateAll} or {@link iterate()}. * through {@link hydrateAll} or {@link iterate()}.
* *
* @return void * @return void
@ -178,7 +178,7 @@ abstract class AbstractHydrator
} }
/** /**
* Excutes one-time cleanup tasks at the end of a hydration that was initiated * Executes one-time cleanup tasks at the end of a hydration that was initiated
* through {@link hydrateAll} or {@link iterate()}. * through {@link hydrateAll} or {@link iterate()}.
* *
* @return void * @return void
@ -223,7 +223,7 @@ abstract class AbstractHydrator
* Puts the elements of a result row into a new array, grouped by the dql alias * Puts the elements of a result row into a new array, grouped by the dql alias
* they belong to. The column names in the result set are mapped to their * they belong to. The column names in the result set are mapped to their
* field names during this procedure as well as any necessary conversions on * field names during this procedure as well as any necessary conversions on
* the values applied. Scalar values are kept in a specfic key 'scalars'. * the values applied. Scalar values are kept in a specific key 'scalars'.
* *
* @param array $data SQL Result Row. * @param array $data SQL Result Row.
* @param array &$cache Cache for column to field result information. * @param array &$cache Cache for column to field result information.
@ -321,7 +321,7 @@ abstract class AbstractHydrator
} }
// in an inheritance hierarchy the same field could be defined several times. // in an inheritance hierarchy the same field could be defined several times.
// We overwrite this value so long we dont have a non-null value, that value we keep. // We overwrite this value so long we don't have a non-null value, that value we keep.
// Per definition it cannot be that a field is defined several times and has several values. // Per definition it cannot be that a field is defined several times and has several values.
if (isset($rowData[$dqlAlias][$cache[$key]['fieldName']]) && $value === null) { if (isset($rowData[$dqlAlias][$cache[$key]['fieldName']]) && $value === null) {
continue; continue;

View File

@ -49,7 +49,7 @@ class HydrationException extends \Doctrine\ORM\ORMException
public static function emptyDiscriminatorValue($dqlAlias) public static function emptyDiscriminatorValue($dqlAlias)
{ {
return new self("The DQL alias '" . $dqlAlias . "' contains an entity ". return new self("The DQL alias '" . $dqlAlias . "' contains an entity ".
"of an inheritance hierachy with an empty discriminator value. This means " . "of an inheritance hierarchy with an empty discriminator value. This means " .
"that the database contains inconsistent data with an empty " . "that the database contains inconsistent data with an empty " .
"discriminator value in a table row." "discriminator value in a table row."
); );

View File

@ -200,7 +200,7 @@ class AssociationBuilder
} else if ($this->type == ClassMetadata::ONE_TO_ONE) { } else if ($this->type == ClassMetadata::ONE_TO_ONE) {
$cm->mapOneToOne($mapping); $cm->mapOneToOne($mapping);
} else { } else {
throw new \InvalidArgumentException("Type should be a ToOne Assocation here"); throw new \InvalidArgumentException("Type should be a ToOne Association here");
} }
return $this->builder; return $this->builder;
} }

View File

@ -163,7 +163,7 @@ class ClassMetadataBuilder
} }
/** /**
* Sets class as root of a joined table inheritance hierachy. * Sets class as root of a joined table inheritance hierarchy.
* *
* @return ClassMetadataBuilder * @return ClassMetadataBuilder
*/ */
@ -175,7 +175,7 @@ class ClassMetadataBuilder
} }
/** /**
* Sets class as root of a single table inheritance hierachy. * Sets class as root of a single table inheritance hierarchy.
* *
* @return ClassMetadataBuilder * @return ClassMetadataBuilder
*/ */
@ -207,7 +207,7 @@ class ClassMetadataBuilder
} }
/** /**
* Adds a subclass to this inheritance hierachy. * Adds a subclass to this inheritance hierarchy.
* *
* @param string $name * @param string $name
* @param string $class * @param string $class
@ -319,7 +319,7 @@ class ClassMetadataBuilder
} }
/** /**
* Creates a ManyToOne Assocation Builder. * Creates a ManyToOne Association Builder.
* *
* Note: This method does not add the association, you have to call build() on the AssociationBuilder. * Note: This method does not add the association, you have to call build() on the AssociationBuilder.
* *
@ -361,7 +361,7 @@ class ClassMetadataBuilder
} }
/** /**
* Adds simple inverse one-to-one assocation. * Adds simple inverse one-to-one association.
* *
* @param string $name * @param string $name
* @param string $targetEntity * @param string $targetEntity
@ -378,7 +378,7 @@ class ClassMetadataBuilder
} }
/** /**
* Adds simple owning one-to-one assocation. * Adds simple owning one-to-one association.
* *
* @param string $name * @param string $name
* @param string $targetEntity * @param string $targetEntity
@ -398,7 +398,7 @@ class ClassMetadataBuilder
} }
/** /**
* Creates a ManyToMany Assocation Builder. * Creates a ManyToMany Association Builder.
* *
* @param string $name * @param string $name
* @param string $targetEntity * @param string $targetEntity
@ -418,7 +418,7 @@ class ClassMetadataBuilder
} }
/** /**
* Adds a simple owning many to many assocation. * Adds a simple owning many to many association.
* *
* @param string $name * @param string $name
* @param string $targetEntity * @param string $targetEntity
@ -438,7 +438,7 @@ class ClassMetadataBuilder
} }
/** /**
* Adds a simple inverse many to many assocation. * Adds a simple inverse many to many association.
* *
* @param string $name * @param string $name
* @param string $targetEntity * @param string $targetEntity
@ -455,7 +455,7 @@ class ClassMetadataBuilder
} }
/** /**
* Creates a one to many assocation builder. * Creates a one to many association builder.
* *
* @param string $name * @param string $name
* @param string $targetEntity * @param string $targetEntity
@ -475,7 +475,7 @@ class ClassMetadataBuilder
} }
/** /**
* Adds simple OneToMany assocation. * Adds simple OneToMany association.
* *
* @param string $name * @param string $name
* @param string $targetEntity * @param string $targetEntity

View File

@ -193,7 +193,7 @@ class ClassMetadataFactory extends AbstractClassMetadataFactory
} }
$class->validateIdentifier(); $class->validateIdentifier();
$class->validateAssocations(); $class->validateAssociations();
$class->validateLifecycleCallbacks($this->getReflectionService()); $class->validateLifecycleCallbacks($this->getReflectionService());
// verify inheritance // verify inheritance
@ -319,7 +319,7 @@ class ClassMetadataFactory extends AbstractClassMetadataFactory
foreach ($parentClass->associationMappings as $field => $mapping) { foreach ($parentClass->associationMappings as $field => $mapping) {
if ($parentClass->isMappedSuperclass) { if ($parentClass->isMappedSuperclass) {
if ($mapping['type'] & ClassMetadata::TO_MANY && !$mapping['isOwningSide']) { if ($mapping['type'] & ClassMetadata::TO_MANY && !$mapping['isOwningSide']) {
throw MappingException::illegalToManyAssocationOnMappedSuperclass($parentClass->name, $field); throw MappingException::illegalToManyAssociationOnMappedSuperclass($parentClass->name, $field);
} }
$mapping['sourceEntity'] = $subClass->name; $mapping['sourceEntity'] = $subClass->name;
} }

View File

@ -509,7 +509,7 @@ class ClassMetadataInfo implements ClassMetadata
public $isIdentifierComposite = false; public $isIdentifierComposite = false;
/** /**
* READ-ONLY: Flag indicating wheather the identifier/primary key contains at least one foreign key association. * READ-ONLY: Flag indicating whether the identifier/primary key contains at least one foreign key association.
* *
* This flag is necessary because some code blocks require special treatment of this cases. * This flag is necessary because some code blocks require special treatment of this cases.
* *
@ -631,7 +631,7 @@ class ClassMetadataInfo implements ClassMetadata
} }
/** /**
* Gets the ReflectionPropertys of the mapped class. * Gets the ReflectionProperties of the mapped class.
* *
* @return array An array of ReflectionProperty instances. * @return array An array of ReflectionProperty instances.
*/ */
@ -938,7 +938,7 @@ class ClassMetadataInfo implements ClassMetadata
* *
* @throws MappingException * @throws MappingException
*/ */
public function validateAssocations() public function validateAssociations()
{ {
foreach ($this->associationMappings as $mapping) { foreach ($this->associationMappings as $mapping) {
if ( ! ClassLoader::classExists($mapping['targetEntity']) ) { if ( ! ClassLoader::classExists($mapping['targetEntity']) ) {
@ -1437,7 +1437,7 @@ class ClassMetadataInfo implements ClassMetadata
)); ));
} }
$uniqueContraintColumns = array(); $uniqueConstraintColumns = array();
foreach ($mapping['joinColumns'] as &$joinColumn) { foreach ($mapping['joinColumns'] as &$joinColumn) {
if ($mapping['type'] === self::ONE_TO_ONE && ! $this->isInheritanceTypeSingleTable()) { if ($mapping['type'] === self::ONE_TO_ONE && ! $this->isInheritanceTypeSingleTable()) {
if (count($mapping['joinColumns']) == 1) { if (count($mapping['joinColumns']) == 1) {
@ -1445,7 +1445,7 @@ class ClassMetadataInfo implements ClassMetadata
$joinColumn['unique'] = true; $joinColumn['unique'] = true;
} }
} else { } else {
$uniqueContraintColumns[] = $joinColumn['name']; $uniqueConstraintColumns[] = $joinColumn['name'];
} }
} }
@ -1472,12 +1472,12 @@ class ClassMetadataInfo implements ClassMetadata
? $joinColumn['fieldName'] : $joinColumn['name']; ? $joinColumn['fieldName'] : $joinColumn['name'];
} }
if ($uniqueContraintColumns) { if ($uniqueConstraintColumns) {
if ( ! $this->table) { if ( ! $this->table) {
throw new RuntimeException("ClassMetadataInfo::setTable() has to be called before defining a one to one relationship."); throw new RuntimeException("ClassMetadataInfo::setTable() has to be called before defining a one to one relationship.");
} }
$this->table['uniqueConstraints'][$mapping['fieldName']."_uniq"] = array( $this->table['uniqueConstraints'][$mapping['fieldName']."_uniq"] = array(
'columns' => $uniqueContraintColumns 'columns' => $uniqueConstraintColumns
); );
} }
@ -1488,7 +1488,7 @@ class ClassMetadataInfo implements ClassMetadata
$mapping['isCascadeRemove'] = $mapping['orphanRemoval'] ? true : $mapping['isCascadeRemove']; $mapping['isCascadeRemove'] = $mapping['orphanRemoval'] ? true : $mapping['isCascadeRemove'];
if (isset($mapping['id']) && $mapping['id'] === true && !$mapping['isOwningSide']) { if (isset($mapping['id']) && $mapping['id'] === true && !$mapping['isOwningSide']) {
throw MappingException::illegalInverseIdentifierAssocation($this->name, $mapping['fieldName']); throw MappingException::illegalInverseIdentifierAssociation($this->name, $mapping['fieldName']);
} }
return $mapping; return $mapping;
@ -2051,7 +2051,7 @@ class ClassMetadataInfo implements ClassMetadata
} }
/** /**
* Checks if this entity is the root in any entity-inheritance-hierachy. * Checks if this entity is the root in any entity-inheritance-hierarchy.
* *
* @return bool * @return bool
*/ */
@ -2427,7 +2427,7 @@ class ClassMetadataInfo implements ClassMetadata
* @deprecated Deprecated since version 2.4 in favor of \Doctrine\ORM\Event\ListenersInvoker * @deprecated Deprecated since version 2.4 in favor of \Doctrine\ORM\Event\ListenersInvoker
* *
* @param string $lifecycleEvent The lifecycle event. * @param string $lifecycleEvent The lifecycle event.
* @param object $entity The Entity on which the event occured. * @param object $entity The Entity on which the event occurred.
* *
* @return void * @return void
*/ */

View File

@ -21,7 +21,7 @@
namespace Doctrine\ORM\Mapping; namespace Doctrine\ORM\Mapping;
/** /**
* The default DefaultEntityListene * The default DefaultEntityListener
* *
* @since 2.4 * @since 2.4
* @author Fabio B. Silva <fabio.bat.silva@gmail.com> * @author Fabio B. Silva <fabio.bat.silva@gmail.com>

View File

@ -247,7 +247,7 @@ class AnnotationDriver extends AbstractAnnotationDriver
$mapping = array(); $mapping = array();
$mapping['fieldName'] = $property->getName(); $mapping['fieldName'] = $property->getName();
// Check for JoinColummn/JoinColumns annotations // Check for JoinColumn/JoinColumns annotations
$joinColumns = array(); $joinColumns = array();
if ($joinColumnAnnot = $this->reader->getPropertyAnnotation($property, 'Doctrine\ORM\Mapping\JoinColumn')) { if ($joinColumnAnnot = $this->reader->getPropertyAnnotation($property, 'Doctrine\ORM\Mapping\JoinColumn')) {
@ -375,7 +375,7 @@ class AnnotationDriver extends AbstractAnnotationDriver
$override = array(); $override = array();
$fieldName = $associationOverride->name; $fieldName = $associationOverride->name;
// Check for JoinColummn/JoinColumns annotations // Check for JoinColumn/JoinColumns annotations
if ($associationOverride->joinColumns) { if ($associationOverride->joinColumns) {
$joinColumns = array(); $joinColumns = array();
foreach ($associationOverride->joinColumns as $joinColumn) { foreach ($associationOverride->joinColumns as $joinColumn) {

View File

@ -84,7 +84,7 @@ class DatabaseDriver implements MappingDriver
} }
/** /**
* Sets tables manually instead of relying on the reverse engeneering capabilities of SchemaManager. * Sets tables manually instead of relying on the reverse engineering capabilities of SchemaManager.
* *
* @param array $entityTables * @param array $entityTables
* @param array $manyToManyTables * @param array $manyToManyTables
@ -252,7 +252,7 @@ class DatabaseDriver implements MappingDriver
if (!$otherFk) { if (!$otherFk) {
// the definition of this many to many table does not contain // the definition of this many to many table does not contain
// enough foreign key information to continue reverse engeneering. // enough foreign key information to continue reverse engineering.
continue; continue;
} }
@ -319,7 +319,7 @@ class DatabaseDriver implements MappingDriver
); );
} }
//Here we need to check if $cols are the same as $primaryKeyColums //Here we need to check if $cols are the same as $primaryKeyColumns
if (!array_diff($cols,$primaryKeyColumns)) { if (!array_diff($cols,$primaryKeyColumns)) {
$metadata->mapOneToOne($associationMapping); $metadata->mapOneToOne($associationMapping);
} else { } else {

View File

@ -224,7 +224,7 @@ class XmlDriver extends FileDriver
$metadata->table['options'] = $this->_parseOptions($xmlRoot->options->children()); $metadata->table['options'] = $this->_parseOptions($xmlRoot->options->children());
} }
// The mapping assignement is done in 2 times as a bug might occurs on some php/xml lib versions // The mapping assignment is done in 2 times as a bug might occurs on some php/xml lib versions
// The internal SimpleXmlIterator get resetted, to this generate a duplicate field exception // The internal SimpleXmlIterator get resetted, to this generate a duplicate field exception
$mappings = array(); $mappings = array();
// Evaluate <field ...> mappings // Evaluate <field ...> mappings

View File

@ -529,7 +529,7 @@ class MappingException extends \Doctrine\ORM\ORMException
*/ */
public static function cannotVersionIdField($className, $fieldName) public static function cannotVersionIdField($className, $fieldName)
{ {
return new self("Setting Id field '$fieldName' as versionale in entity class '$className' is not supported."); return new self("Setting Id field '$fieldName' as versionable in entity class '$className' is not supported.");
} }
/** /**
@ -561,7 +561,7 @@ class MappingException extends \Doctrine\ORM\ORMException
* *
* @return MappingException * @return MappingException
*/ */
public static function illegalToManyAssocationOnMappedSuperclass($className, $field) public static function illegalToManyAssociationOnMappedSuperclass($className, $field)
{ {
return new self("It is illegal to put an inverse side one-to-many or many-to-many association on mapped superclass '".$className."#".$field."'."); return new self("It is illegal to put an inverse side one-to-many or many-to-many association on mapped superclass '".$className."#".$field."'.");
} }
@ -632,7 +632,7 @@ class MappingException extends \Doctrine\ORM\ORMException
* *
* @return MappingException * @return MappingException
*/ */
public static function illegalInverseIdentifierAssocation($className, $field) public static function illegalInverseIdentifierAssociation($className, $field)
{ {
return new self("An inverse association is not allowed to be identifier in '$className#$field'."); return new self("An inverse association is not allowed to be identifier in '$className#$field'.");
} }
@ -643,7 +643,7 @@ class MappingException extends \Doctrine\ORM\ORMException
* *
* @return MappingException * @return MappingException
*/ */
public static function illegalToManyIdentifierAssoaction($className, $field) public static function illegalToManyIdentifierAssociation($className, $field)
{ {
return new self("Many-to-many or one-to-many associations are not allowed to be identifier in '$className#$field'."); return new self("Many-to-many or one-to-many associations are not allowed to be identifier in '$className#$field'.");
} }
@ -668,8 +668,8 @@ class MappingException extends \Doctrine\ORM\ORMException
{ {
return new self( return new self(
"Entity '" . $className . "' has to be part of the discriminator map of '" . $rootClassName . "' " . "Entity '" . $className . "' has to be part of the discriminator map of '" . $rootClassName . "' " .
"to be properly mapped in the inheritance hierachy. Alternatively you can make '".$className."' an abstract class " . "to be properly mapped in the inheritance hierarchy. Alternatively you can make '".$className."' an abstract class " .
"to avoid this exception from occuring." "to avoid this exception from occurring."
); );
} }

View File

@ -176,7 +176,7 @@ class ORMInvalidArgumentException extends \InvalidArgumentException
public static function invalidCompositeIdentifier() public static function invalidCompositeIdentifier()
{ {
return new self("Binding an entity with a composite primary key to a query is not supported. " . return new self("Binding an entity with a composite primary key to a query is not supported. " .
"You should split the parameter into the explicit fields and bind them seperately."); "You should split the parameter into the explicit fields and bind them separately.");
} }
/** /**

View File

@ -71,7 +71,7 @@ class OptimisticLockException extends ORMException
* *
* @return OptimisticLockException * @return OptimisticLockException
*/ */
public static function lockFailedVersionMissmatch($entity, $expectedLockVersion, $actualLockVersion) public static function lockFailedVersionMismatch($entity, $expectedLockVersion, $actualLockVersion)
{ {
return new self("The optimistic lock failed, version " . $expectedLockVersion . " was expected, but is actually ".$actualLockVersion, $entity); return new self("The optimistic lock failed, version " . $expectedLockVersion . " was expected, but is actually ".$actualLockVersion, $entity);
} }

View File

@ -843,7 +843,7 @@ final class PersistentCollection implements Collection, Selectable
} }
if ($this->association['type'] !== ClassMetadata::ONE_TO_MANY) { if ($this->association['type'] !== ClassMetadata::ONE_TO_MANY) {
throw new \RuntimeException("Matching Criteria on PersistentCollection only works on OneToMany assocations at the moment."); throw new \RuntimeException("Matching Criteria on PersistentCollection only works on OneToMany associations at the moment.");
} }
// If there are NEW objects we have to check if any of them matches the criteria // If there are NEW objects we have to check if any of them matches the criteria

View File

@ -37,7 +37,7 @@ use Doctrine\Common\Collections\Criteria;
use Doctrine\Common\Collections\Expr\Comparison; use Doctrine\Common\Collections\Expr\Comparison;
/** /**
* A BasicEntityPersiter maps an entity to a single table in a relational database. * A BasicEntityPersister maps an entity to a single table in a relational database.
* *
* A persister is always responsible for a single entity type. * A persister is always responsible for a single entity type.
* *
@ -177,7 +177,7 @@ class BasicEntityPersister
protected $selectColumnListSql; protected $selectColumnListSql;
/** /**
* The JOIN SQL fragement used to eagerly load all many-to-one and one-to-one * The JOIN SQL fragment used to eagerly load all many-to-one and one-to-one
* associations configured as FETCH_EAGER, as well as all inverse one-to-one associations. * associations configured as FETCH_EAGER, as well as all inverse one-to-one associations.
* *
* @var string * @var string
@ -499,7 +499,7 @@ class BasicEntityPersister
} }
// @Todo this only covers scenarios with no inheritance or of the same level. Is there something // @Todo this only covers scenarios with no inheritance or of the same level. Is there something
// like self-referential relationship between different levels of an inheritance hierachy? I hope not! // like self-referential relationship between different levels of an inheritance hierarchy? I hope not!
$selfReferential = ($mapping['targetEntity'] == $mapping['sourceEntity']); $selfReferential = ($mapping['targetEntity'] == $mapping['sourceEntity']);
$class = $this->class; $class = $this->class;
$association = $mapping; $association = $mapping;

View File

@ -302,31 +302,31 @@ class JoinedSubclassPersister extends AbstractEntityInheritancePersister
// INNER JOIN parent tables // INNER JOIN parent tables
foreach ($this->class->parentClasses as $parentClassName) { foreach ($this->class->parentClasses as $parentClassName) {
$contitions = array(); $conditions = array();
$parentClass = $this->em->getClassMetadata($parentClassName); $parentClass = $this->em->getClassMetadata($parentClassName);
$tableAlias = $this->getSQLTableAlias($parentClassName); $tableAlias = $this->getSQLTableAlias($parentClassName);
$joinSql .= ' INNER JOIN ' . $this->quoteStrategy->getTableName($parentClass, $this->platform) . ' ' . $tableAlias . ' ON '; $joinSql .= ' INNER JOIN ' . $this->quoteStrategy->getTableName($parentClass, $this->platform) . ' ' . $tableAlias . ' ON ';
foreach ($identifierColumn as $idColumn) { foreach ($identifierColumn as $idColumn) {
$contitions[] = $baseTableAlias . '.' . $idColumn . ' = ' . $tableAlias . '.' . $idColumn; $conditions[] = $baseTableAlias . '.' . $idColumn . ' = ' . $tableAlias . '.' . $idColumn;
} }
$joinSql .= implode(' AND ', $contitions); $joinSql .= implode(' AND ', $conditions);
} }
// OUTER JOIN sub tables // OUTER JOIN sub tables
foreach ($this->class->subClasses as $subClassName) { foreach ($this->class->subClasses as $subClassName) {
$contitions = array(); $conditions = array();
$subClass = $this->em->getClassMetadata($subClassName); $subClass = $this->em->getClassMetadata($subClassName);
$tableAlias = $this->getSQLTableAlias($subClassName); $tableAlias = $this->getSQLTableAlias($subClassName);
$joinSql .= ' LEFT JOIN ' . $this->quoteStrategy->getTableName($subClass, $this->platform) . ' ' . $tableAlias . ' ON '; $joinSql .= ' LEFT JOIN ' . $this->quoteStrategy->getTableName($subClass, $this->platform) . ' ' . $tableAlias . ' ON ';
foreach ($identifierColumn as $idColumn) { foreach ($identifierColumn as $idColumn) {
$contitions[] = $baseTableAlias . '.' . $idColumn . ' = ' . $tableAlias . '.' . $idColumn; $conditions[] = $baseTableAlias . '.' . $idColumn . ' = ' . $tableAlias . '.' . $idColumn;
} }
$joinSql .= implode(' AND ', $contitions); $joinSql .= implode(' AND ', $conditions);
} }
if ($assoc != null && $assoc['type'] == ClassMetadata::MANY_TO_MANY) { if ($assoc != null && $assoc['type'] == ClassMetadata::MANY_TO_MANY) {

View File

@ -178,7 +178,7 @@ class SingleTablePersister extends AbstractEntityInheritancePersister
{ {
// Ensure that the filters are applied to the root entity of the inheritance tree // Ensure that the filters are applied to the root entity of the inheritance tree
$targetEntity = $this->em->getClassMetadata($targetEntity->rootEntityName); $targetEntity = $this->em->getClassMetadata($targetEntity->rootEntityName);
// we dont care about the $targetTableAlias, in a STI there is only one table. // we don't care about the $targetTableAlias, in a STI there is only one table.
return parent::generateFilterConditionSQL($targetEntity, $targetTableAlias); return parent::generateFilterConditionSQL($targetEntity, $targetTableAlias);
} }

View File

@ -327,7 +327,7 @@ final class Query extends AbstractQuery
} }
if (count($sqlParams) != count($types)) { if (count($sqlParams) != count($types)) {
throw QueryException::parameterTypeMissmatch(); throw QueryException::parameterTypeMismatch();
} }
if ($sqlParams) { if ($sqlParams) {

View File

@ -350,8 +350,8 @@ class Expr
* When converted to string, it will generated a <left expr> * <right expr>. Example: * When converted to string, it will generated a <left expr> * <right expr>. Example:
* *
* [php] * [php]
* // u.salary * u.percentAnualSalaryIncrease * // u.salary * u.percentAnnualSalaryIncrease
* $q->expr()->prod('u.salary', 'u.percentAnualSalaryIncrease') * $q->expr()->prod('u.salary', 'u.percentAnnualSalaryIncrease')
* *
* @param mixed $x Left expression. * @param mixed $x Left expression.
* @param mixed $y Right expression. * @param mixed $y Right expression.

View File

@ -23,7 +23,7 @@ use Doctrine\DBAL\Connection;
use Doctrine\DBAL\Types\Type; use Doctrine\DBAL\Types\Type;
/** /**
* Provides an enclosed support for parameter infering. * Provides an enclosed support for parameter inferring.
* *
* @link www.doctrine-project.org * @link www.doctrine-project.org
* @since 2.0 * @since 2.0

View File

@ -305,7 +305,7 @@ class Parser
* *
* @return void * @return void
* *
* @throws QueryException If the tokens dont match. * @throws QueryException If the tokens don't match.
*/ */
public function match($token) public function match($token)
{ {
@ -644,7 +644,7 @@ class Parser
} }
if ($class->getConstructor() === null) { if ($class->getConstructor() === null) {
$this->semanticalError(sprintf('Class "%s" has not a valid contructor.', $className), $token); $this->semanticalError(sprintf('Class "%s" has not a valid constructor.', $className), $token);
} }
if ($class->getConstructor()->getNumberOfRequiredParameters() > count($args)) { if ($class->getConstructor()->getNumberOfRequiredParameters() > count($args)) {
@ -2373,7 +2373,7 @@ class Parser
return $condPrimary; return $condPrimary;
} }
// Peek beyond the matching closing paranthesis ')' // Peek beyond the matching closing parenthesis ')'
$peek = $this->peekBeyondClosingParenthesis(); $peek = $this->peekBeyondClosingParenthesis();
if (in_array($peek['value'], array("=", "<", "<=", "<>", ">", ">=", "!=")) || if (in_array($peek['value'], array("=", "<", "<=", "<>", ">", ">=", "!=")) ||
@ -2445,7 +2445,7 @@ class Parser
$token = $this->lexer->peek(); $token = $this->lexer->peek();
} }
// We need to go even further in case of IS (differenciate between NULL and EMPTY) // We need to go even further in case of IS (differentiate between NULL and EMPTY)
$lookahead = $this->lexer->peek(); $lookahead = $this->lexer->peek();
} }
@ -2495,19 +2495,19 @@ class Parser
*/ */
public function EmptyCollectionComparisonExpression() public function EmptyCollectionComparisonExpression()
{ {
$emptyColletionCompExpr = new AST\EmptyCollectionComparisonExpression( $emptyCollectionCompExpr = new AST\EmptyCollectionComparisonExpression(
$this->CollectionValuedPathExpression() $this->CollectionValuedPathExpression()
); );
$this->match(Lexer::T_IS); $this->match(Lexer::T_IS);
if ($this->lexer->isNextToken(Lexer::T_NOT)) { if ($this->lexer->isNextToken(Lexer::T_NOT)) {
$this->match(Lexer::T_NOT); $this->match(Lexer::T_NOT);
$emptyColletionCompExpr->not = true; $emptyCollectionCompExpr->not = true;
} }
$this->match(Lexer::T_EMPTY); $this->match(Lexer::T_EMPTY);
return $emptyColletionCompExpr; return $emptyCollectionCompExpr;
} }
/** /**
@ -2800,7 +2800,7 @@ class Parser
} }
if ($peek['value'] == '(') { if ($peek['value'] == '(') {
// do NOT directly go to FunctionsReturningString() because it doesnt check for custom functions. // do NOT directly go to FunctionsReturningString() because it doesn't check for custom functions.
return $this->FunctionDeclaration(); return $this->FunctionDeclaration();
} }

View File

@ -123,9 +123,9 @@ class QueryException extends \Doctrine\ORM\ORMException
/** /**
* @return QueryException * @return QueryException
*/ */
public static function parameterTypeMissmatch() public static function parameterTypeMismatch()
{ {
return new self("DQL Query parameter and type numbers missmatch, but have to be exactly equal."); return new self("DQL Query parameter and type numbers mismatch, but have to be exactly equal.");
} }
/** /**
@ -159,7 +159,7 @@ class QueryException extends \Doctrine\ORM\ORMException
{ {
return new self( return new self(
"Invalid query operation: Not allowed to iterate over fetch join collections ". "Invalid query operation: Not allowed to iterate over fetch join collections ".
"in class ".$assoc['sourceEntity']." assocation ".$assoc['fieldName'] "in class ".$assoc['sourceEntity']." association ".$assoc['fieldName']
); );
} }
@ -184,7 +184,7 @@ class QueryException extends \Doctrine\ORM\ORMException
{ {
return new self( return new self(
"Unsupported query operation: It is not yet possible to overwrite the join ". "Unsupported query operation: It is not yet possible to overwrite the join ".
"conditions in class ".$assoc['sourceEntityName']." assocation ".$assoc['fieldName'].". ". "conditions in class ".$assoc['sourceEntityName']." association ".$assoc['fieldName'].". ".
"Use WITH to append additional join conditions to the association." "Use WITH to append additional join conditions to the association."
); );
} }
@ -234,7 +234,7 @@ class QueryException extends \Doctrine\ORM\ORMException
public static function instanceOfUnrelatedClass($className, $rootClass) public static function instanceOfUnrelatedClass($className, $rootClass)
{ {
return new self("Cannot check if a child of '" . $rootClass . "' is instanceof '" . $className . "', " . return new self("Cannot check if a child of '" . $rootClass . "' is instanceof '" . $className . "', " .
"inheritance hierachy exists between these two classes."); "inheritance hierarchy exists between these two classes.");
} }
/** /**

View File

@ -1042,7 +1042,7 @@ class SqlWalker implements TreeWalker
// Handle WITH clause // Handle WITH clause
if (($condExpr = $join->conditionalExpression) !== null) { if (($condExpr = $join->conditionalExpression) !== null) {
// Phase 2 AST optimization: Skip processment of ConditionalExpression // Phase 2 AST optimization: Skip processing of ConditionalExpression
// if only one ConditionalTerm is defined // if only one ConditionalTerm is defined
$sql .= ' AND (' . $this->walkConditionalExpression($condExpr) . ')'; $sql .= ' AND (' . $this->walkConditionalExpression($condExpr) . ')';
} }
@ -1691,7 +1691,7 @@ class SqlWalker implements TreeWalker
*/ */
public function walkConditionalExpression($condExpr) public function walkConditionalExpression($condExpr)
{ {
// Phase 2 AST optimization: Skip processment of ConditionalExpression // Phase 2 AST optimization: Skip processing of ConditionalExpression
// if only one ConditionalTerm is defined // if only one ConditionalTerm is defined
if ( ! ($condExpr instanceof AST\ConditionalExpression)) { if ( ! ($condExpr instanceof AST\ConditionalExpression)) {
return $this->walkConditionalTerm($condExpr); return $this->walkConditionalTerm($condExpr);
@ -1705,7 +1705,7 @@ class SqlWalker implements TreeWalker
*/ */
public function walkConditionalTerm($condTerm) public function walkConditionalTerm($condTerm)
{ {
// Phase 2 AST optimization: Skip processment of ConditionalTerm // Phase 2 AST optimization: Skip processing of ConditionalTerm
// if only one ConditionalFactor is defined // if only one ConditionalFactor is defined
if ( ! ($condTerm instanceof AST\ConditionalTerm)) { if ( ! ($condTerm instanceof AST\ConditionalTerm)) {
return $this->walkConditionalFactor($condTerm); return $this->walkConditionalFactor($condTerm);
@ -1719,7 +1719,7 @@ class SqlWalker implements TreeWalker
*/ */
public function walkConditionalFactor($factor) public function walkConditionalFactor($factor)
{ {
// Phase 2 AST optimization: Skip processment of ConditionalFactor // Phase 2 AST optimization: Skip processing of ConditionalFactor
// if only one ConditionalPrimary is defined // if only one ConditionalPrimary is defined
return ( ! ($factor instanceof AST\ConditionalFactor)) return ( ! ($factor instanceof AST\ConditionalFactor))
? $this->walkConditionalPrimary($factor) ? $this->walkConditionalPrimary($factor)
@ -2114,7 +2114,7 @@ class SqlWalker implements TreeWalker
: $term; : $term;
} }
// Phase 2 AST optimization: Skip processment of ArithmeticTerm // Phase 2 AST optimization: Skip processing of ArithmeticTerm
// if only one ArithmeticFactor is defined // if only one ArithmeticFactor is defined
if ( ! ($term instanceof AST\ArithmeticTerm)) { if ( ! ($term instanceof AST\ArithmeticTerm)) {
return $this->walkArithmeticFactor($term); return $this->walkArithmeticFactor($term);
@ -2132,7 +2132,7 @@ class SqlWalker implements TreeWalker
return $factor; return $factor;
} }
// Phase 2 AST optimization: Skip processment of ArithmeticFactor // Phase 2 AST optimization: Skip processing of ArithmeticFactor
// if only one ArithmeticPrimary is defined // if only one ArithmeticPrimary is defined
if ( ! ($factor instanceof AST\ArithmeticFactor)) { if ( ! ($factor instanceof AST\ArithmeticFactor)) {
return $this->walkArithmeticPrimary($factor); return $this->walkArithmeticPrimary($factor);

View File

@ -90,7 +90,7 @@ abstract class TreeWalkerAdapter implements TreeWalker
} }
/** /**
* Retrieves the Query Instance reponsible for the current walkers execution. * Retrieves the Query Instance responsible for the current walkers execution.
* *
* @return \Doctrine\ORM\AbstractQuery * @return \Doctrine\ORM\AbstractQuery
*/ */

View File

@ -86,10 +86,10 @@ class ConvertMappingCommand extends Command
Convert mapping information between supported formats. Convert mapping information between supported formats.
This is an execute <info>one-time</info> command. It should not be necessary for This is an execute <info>one-time</info> command. It should not be necessary for
you to call this method multiple times, escpecially when using the <comment>--from-database</comment> you to call this method multiple times, especially when using the <comment>--from-database</comment>
flag. flag.
Converting an existing databsae schema into mapping files only solves about 70-80% Converting an existing database schema into mapping files only solves about 70-80%
of the necessary mapping information. Additionally the detection from an existing of the necessary mapping information. Additionally the detection from an existing
database cannot detect inverse associations, inheritance types, database cannot detect inverse associations, inheritance types,
entities with foreign keys as primary keys and many of the entities with foreign keys as primary keys and many of the

View File

@ -91,7 +91,7 @@ to error and we suggest you use code repositories such as GIT or SVN to make
backups of your code. backups of your code.
It makes sense to generate the entity code if you are using entities as Data It makes sense to generate the entity code if you are using entities as Data
Access Objects only and dont put much additional logic on them. If you are Access Objects only and don't put much additional logic on them. If you are
however putting much more logic on the entities you should refrain from using however putting much more logic on the entities you should refrain from using
the entity-generator and code your entities manually. the entity-generator and code your entities manually.

View File

@ -500,7 +500,7 @@ class SchemaTool
* Gets the class metadata that is responsible for the definition of the referenced column name. * Gets the class metadata that is responsible for the definition of the referenced column name.
* *
* Previously this was a simple task, but with DDC-117 this problem is actually recursive. If its * Previously this was a simple task, but with DDC-117 this problem is actually recursive. If its
* not a simple field, go through all identifier field names that are associations recursivly and * not a simple field, go through all identifier field names that are associations recursively and
* find that referenced column name. * find that referenced column name.
* *
* TODO: Is there any way to make this code more pleasing? * TODO: Is there any way to make this code more pleasing?
@ -643,7 +643,7 @@ class SchemaTool
/** /**
* Drops the database schema for the given classes. * Drops the database schema for the given classes.
* *
* In any way when an exception is thrown it is supressed since drop was * In any way when an exception is thrown it is suppressed since drop was
* issued for all classes of the schema and some probably just don't exist. * issued for all classes of the schema and some probably just don't exist.
* *
* @param array $classes * @param array $classes

View File

@ -23,7 +23,7 @@ class ToolEvents
{ {
/** /**
* The postGenerateSchemaTable event occurs in SchemaTool#getSchemaFromMetadata() * The postGenerateSchemaTable event occurs in SchemaTool#getSchemaFromMetadata()
* whenever an entity class is transformed into its table representation. It recieves * whenever an entity class is transformed into its table representation. It receives
* the current non-complete Schema instance, the Entity Metadata Class instance and * the current non-complete Schema instance, the Entity Metadata Class instance and
* the Schema Table instance of this entity. * the Schema Table instance of this entity.
* *

View File

@ -1822,7 +1822,7 @@ class UnitOfWork implements PropertyChangedListener
// Throw exception if versions dont match. // Throw exception if versions dont match.
if ($managedCopyVersion != $entityVersion) { if ($managedCopyVersion != $entityVersion) {
throw OptimisticLockException::lockFailedVersionMissmatch($entity, $entityVersion, $managedCopyVersion); throw OptimisticLockException::lockFailedVersionMismatch($entity, $entityVersion, $managedCopyVersion);
} }
} }
@ -2281,7 +2281,7 @@ class UnitOfWork implements PropertyChangedListener
$entityVersion = $class->reflFields[$class->versionField]->getValue($entity); $entityVersion = $class->reflFields[$class->versionField]->getValue($entity);
if ($entityVersion != $lockVersion) { if ($entityVersion != $lockVersion) {
throw OptimisticLockException::lockFailedVersionMissmatch($entity, $lockVersion, $entityVersion); throw OptimisticLockException::lockFailedVersionMismatch($entity, $lockVersion, $entityVersion);
} }
break; break;

View File

@ -2,7 +2,7 @@
<!-- <!--
Use this configuration file as a template to run the tests against any dbms. Use this configuration file as a template to run the tests against any dbms.
Procedure: Procedure:
1) Save a copy of this file with a name of your chosing. It doesn't matter 1) Save a copy of this file with a name of your choosing. It doesn't matter
where you place it as long as you know where it is. where you place it as long as you know where it is.
i.e. "mysqlconf.xml" (It needs the ending .xml). i.e. "mysqlconf.xml" (It needs the ending .xml).
2) Edit the file and fill in your settings (database name, type, username, etc.) 2) Edit the file and fill in your settings (database name, type, username, etc.)

View File

@ -2,7 +2,7 @@
# This script is a small convenience wrapper for running the doctrine testsuite against a large bunch of databases. # This script is a small convenience wrapper for running the doctrine testsuite against a large bunch of databases.
# Just create the phpunit.xmls as described in the array below and configure the specific files <php /> section # Just create the phpunit.xmls as described in the array below and configure the specific files <php /> section
# to connect to that database. Just omit a file if you dont have that database and the tests will be skipped. # to connect to that database. Just omit a file if you don't have that database and the tests will be skipped.
configs[1]="mysql.phpunit.xml" configs[1]="mysql.phpunit.xml"
configs[2]='postgres.phpunit.xml' configs[2]='postgres.phpunit.xml'

View File

@ -4,8 +4,8 @@ namespace Doctrine\Tests\Models\StockExchange;
use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\ArrayCollection;
/** /**
* Bonds have many stocks. This uses a many to many assocation and fails to model how many of a * Bonds have many stocks. This uses a many to many association and fails to model how many of a
* particular stock a bond has. But i Need a many-to-many assocation, so please bear with my modelling skills ;) * particular stock a bond has. But i Need a many-to-many association, so please bear with my modelling skills ;)
* *
* @Entity * @Entity
* @Table(name="exchange_bonds") * @Table(name="exchange_bonds")

View File

@ -76,7 +76,7 @@ class AdvancedDqlQueryTest extends \Doctrine\Tests\OrmFunctionalTestCase
$this->assertEquals(1, $result[3]['friends']); $this->assertEquals(1, $result[3]['friends']);
} }
public function testIsNullAssocation() public function testIsNullAssociation()
{ {
$dql = 'SELECT p FROM Doctrine\Tests\Models\Company\CompanyPerson p '. $dql = 'SELECT p FROM Doctrine\Tests\Models\Company\CompanyPerson p '.
'WHERE p.spouse IS NULL'; 'WHERE p.spouse IS NULL';

View File

@ -1274,7 +1274,7 @@ class BasicFunctionalTest extends \Doctrine\Tests\OrmFunctionalTestCase
/** /**
* @group DDC-1585 * @group DDC-1585
*/ */
public function testWrongAssocationInstance() public function testWrongAssociationInstance()
{ {
$user = new CmsUser; $user = new CmsUser;
$user->name = 'Dominik'; $user->name = 'Dominik';

View File

@ -417,7 +417,7 @@ class ClassTableInheritanceTest extends \Doctrine\Tests\OrmFunctionalTestCase
$ref = $this->_em->getReference('Doctrine\Tests\Models\Company\CompanyPerson', $manager->getId()); $ref = $this->_em->getReference('Doctrine\Tests\Models\Company\CompanyPerson', $manager->getId());
$this->assertNotInstanceOf('Doctrine\ORM\Proxy\Proxy', $ref, "Cannot Request a proxy from a class that has subclasses."); $this->assertNotInstanceOf('Doctrine\ORM\Proxy\Proxy', $ref, "Cannot Request a proxy from a class that has subclasses.");
$this->assertInstanceOf('Doctrine\Tests\Models\Company\CompanyPerson', $ref); $this->assertInstanceOf('Doctrine\Tests\Models\Company\CompanyPerson', $ref);
$this->assertInstanceOf('Doctrine\Tests\Models\Company\CompanyEmployee', $ref, "Direct fetch of the reference has to load the child class Emplyoee directly."); $this->assertInstanceOf('Doctrine\Tests\Models\Company\CompanyEmployee', $ref, "Direct fetch of the reference has to load the child class Employee directly.");
$this->_em->clear(); $this->_em->clear();
$ref = $this->_em->getReference('Doctrine\Tests\Models\Company\CompanyManager', $manager->getId()); $ref = $this->_em->getReference('Doctrine\Tests\Models\Company\CompanyManager', $manager->getId());

View File

@ -132,7 +132,7 @@ class CompositePrimaryKeyTest extends \Doctrine\Tests\OrmFunctionalTestCase
$this->assertEquals(1, count($tours)); $this->assertEquals(1, count($tours));
} }
public function testSpecifiyUnknownIdentifierPrimaryKeyFails() public function testSpecifyUnknownIdentifierPrimaryKeyFails()
{ {
$this->setExpectedException('Doctrine\ORM\ORMException', 'The identifier long is missing for a query of Doctrine\Tests\Models\Navigation\NavPointOfInterest'); $this->setExpectedException('Doctrine\ORM\ORMException', 'The identifier long is missing for a query of Doctrine\Tests\Models\Navigation\NavPointOfInterest');
$poi = $this->_em->find('Doctrine\Tests\Models\Navigation\NavPointOfInterest', array('key1' => 100)); $poi = $this->_em->find('Doctrine\Tests\Models\Navigation\NavPointOfInterest', array('key1' => 100));

View File

@ -58,7 +58,7 @@ class DefaultValuesTest extends \Doctrine\Tests\OrmFunctionalTestCase
/** /**
* @group DDC-1386 * @group DDC-1386
*/ */
public function testGetPartialReferenceWithDefaultValueNotEvalutedInFlush() public function testGetPartialReferenceWithDefaultValueNotEvaluatedInFlush()
{ {
$user = new DefaultValueUser; $user = new DefaultValueUser;
$user->name = 'romanb'; $user->name = 'romanb';

View File

@ -618,7 +618,7 @@ class EntityRepositoryTest extends \Doctrine\Tests\OrmFunctionalTestCase
* @expectedException Doctrine\ORM\ORMException * @expectedException Doctrine\ORM\ORMException
* @expectedExceptionMessage You cannot search for the association field 'Doctrine\Tests\Models\CMS\CmsUser#address', because it is the inverse side of an association. * @expectedExceptionMessage You cannot search for the association field 'Doctrine\Tests\Models\CMS\CmsUser#address', because it is the inverse side of an association.
*/ */
public function testInvalidOrderByAsssociation() public function testInvalidOrderByAssociation()
{ {
$this->_em->getRepository('Doctrine\Tests\Models\CMS\CmsUser') $this->_em->getRepository('Doctrine\Tests\Models\CMS\CmsUser')
->findBy(array('status' => 'test'), array('address' => 'ASC')); ->findBy(array('status' => 'test'), array('address' => 'ASC'));
@ -638,7 +638,7 @@ class EntityRepositoryTest extends \Doctrine\Tests\OrmFunctionalTestCase
/** /**
* @group DDC-1713 * @group DDC-1713
*/ */
public function testFindByAssocationArray() public function testFindByAssociationArray()
{ {
$repo = $this->_em->getRepository('Doctrine\Tests\Models\CMS\CmsArticle'); $repo = $this->_em->getRepository('Doctrine\Tests\Models\CMS\CmsArticle');
$data = $repo->findBy(array('user' => array(1, 2, 3))); $data = $repo->findBy(array('user' => array(1, 2, 3)));

View File

@ -91,7 +91,7 @@ class ExtraLazyCollectionTest extends \Doctrine\Tests\OrmFunctionalTestCase
$this->assertTrue($user->groups->isInitialized()); $this->assertTrue($user->groups->isInitialized());
$this->assertEquals(3, count($user->groups)); $this->assertEquals(3, count($user->groups));
$this->assertEquals($queryCount + 1, $this->getCurrentQueryCount(), "Should only execute one query to initialize colleciton, no extra query for count() more."); $this->assertEquals($queryCount + 1, $this->getCurrentQueryCount(), "Should only execute one query to initialize collection, no extra query for count() more.");
} }
/** /**

View File

@ -51,8 +51,8 @@ class IndexByAssociationTest extends \Doctrine\Tests\OrmFunctionalTestCase
$market = $this->_em->find('Doctrine\Tests\Models\StockExchange\Market', $this->market->getId()); $market = $this->_em->find('Doctrine\Tests\Models\StockExchange\Market', $this->market->getId());
$this->assertEquals(2, count($market->stocks)); $this->assertEquals(2, count($market->stocks));
$this->assertTrue(isset($market->stocks['AAPL']), "AAPL symbol has to be key in indexed assocation."); $this->assertTrue(isset($market->stocks['AAPL']), "AAPL symbol has to be key in indexed association.");
$this->assertTrue(isset($market->stocks['GOOG']), "GOOG symbol has to be key in indexed assocation."); $this->assertTrue(isset($market->stocks['GOOG']), "GOOG symbol has to be key in indexed association.");
$this->assertEquals("AAPL", $market->stocks['AAPL']->getSymbol()); $this->assertEquals("AAPL", $market->stocks['AAPL']->getSymbol());
$this->assertEquals("GOOG", $market->stocks['GOOG']->getSymbol()); $this->assertEquals("GOOG", $market->stocks['GOOG']->getSymbol());
} }
@ -63,8 +63,8 @@ class IndexByAssociationTest extends \Doctrine\Tests\OrmFunctionalTestCase
$market = $this->_em->createQuery($dql)->setParameter(1, $this->market->getId())->getSingleResult(); $market = $this->_em->createQuery($dql)->setParameter(1, $this->market->getId())->getSingleResult();
$this->assertEquals(2, count($market->stocks)); $this->assertEquals(2, count($market->stocks));
$this->assertTrue(isset($market->stocks['AAPL']), "AAPL symbol has to be key in indexed assocation."); $this->assertTrue(isset($market->stocks['AAPL']), "AAPL symbol has to be key in indexed association.");
$this->assertTrue(isset($market->stocks['GOOG']), "GOOG symbol has to be key in indexed assocation."); $this->assertTrue(isset($market->stocks['GOOG']), "GOOG symbol has to be key in indexed association.");
$this->assertEquals("AAPL", $market->stocks['AAPL']->getSymbol()); $this->assertEquals("AAPL", $market->stocks['AAPL']->getSymbol());
$this->assertEquals("GOOG", $market->stocks['GOOG']->getSymbol()); $this->assertEquals("GOOG", $market->stocks['GOOG']->getSymbol());
} }
@ -74,8 +74,8 @@ class IndexByAssociationTest extends \Doctrine\Tests\OrmFunctionalTestCase
$bond = $this->_em->find('Doctrine\Tests\Models\StockExchange\Bond', $this->bond->getId()); $bond = $this->_em->find('Doctrine\Tests\Models\StockExchange\Bond', $this->bond->getId());
$this->assertEquals(2, count($bond->stocks)); $this->assertEquals(2, count($bond->stocks));
$this->assertTrue(isset($bond->stocks['AAPL']), "AAPL symbol has to be key in indexed assocation."); $this->assertTrue(isset($bond->stocks['AAPL']), "AAPL symbol has to be key in indexed association.");
$this->assertTrue(isset($bond->stocks['GOOG']), "GOOG symbol has to be key in indexed assocation."); $this->assertTrue(isset($bond->stocks['GOOG']), "GOOG symbol has to be key in indexed association.");
$this->assertEquals("AAPL", $bond->stocks['AAPL']->getSymbol()); $this->assertEquals("AAPL", $bond->stocks['AAPL']->getSymbol());
$this->assertEquals("GOOG", $bond->stocks['GOOG']->getSymbol()); $this->assertEquals("GOOG", $bond->stocks['GOOG']->getSymbol());
} }
@ -86,8 +86,8 @@ class IndexByAssociationTest extends \Doctrine\Tests\OrmFunctionalTestCase
$bond = $this->_em->createQuery($dql)->setParameter(1, $this->bond->getId())->getSingleResult(); $bond = $this->_em->createQuery($dql)->setParameter(1, $this->bond->getId())->getSingleResult();
$this->assertEquals(2, count($bond->stocks)); $this->assertEquals(2, count($bond->stocks));
$this->assertTrue(isset($bond->stocks['AAPL']), "AAPL symbol has to be key in indexed assocation."); $this->assertTrue(isset($bond->stocks['AAPL']), "AAPL symbol has to be key in indexed association.");
$this->assertTrue(isset($bond->stocks['GOOG']), "GOOG symbol has to be key in indexed assocation."); $this->assertTrue(isset($bond->stocks['GOOG']), "GOOG symbol has to be key in indexed association.");
$this->assertEquals("AAPL", $bond->stocks['AAPL']->getSymbol()); $this->assertEquals("AAPL", $bond->stocks['AAPL']->getSymbol());
$this->assertEquals("GOOG", $bond->stocks['GOOG']->getSymbol()); $this->assertEquals("GOOG", $bond->stocks['GOOG']->getSymbol());
} }
@ -98,8 +98,8 @@ class IndexByAssociationTest extends \Doctrine\Tests\OrmFunctionalTestCase
$bond = $this->_em->createQuery($dql)->setParameter(1, $this->bond->getId())->getSingleResult(); $bond = $this->_em->createQuery($dql)->setParameter(1, $this->bond->getId())->getSingleResult();
$this->assertEquals(2, count($bond->stocks)); $this->assertEquals(2, count($bond->stocks));
$this->assertFalse(isset($bond->stocks['AAPL']), "AAPL symbol not exists in re-indexed assocation."); $this->assertFalse(isset($bond->stocks['AAPL']), "AAPL symbol not exists in re-indexed association.");
$this->assertFalse(isset($bond->stocks['GOOG']), "GOOG symbol not exists in re-indexed assocation."); $this->assertFalse(isset($bond->stocks['GOOG']), "GOOG symbol not exists in re-indexed association.");
} }
} }

View File

@ -38,7 +38,7 @@ class LockTest extends \Doctrine\Tests\OrmFunctionalTestCase {
* @group DDC-178 * @group DDC-178
* @group locking * @group locking
*/ */
public function testLockVersionedEntity_MissmatchThrowsException() { public function testLockVersionedEntity_MismatchThrowsException() {
$article = new CmsArticle(); $article = new CmsArticle();
$article->text = "my article"; $article->text = "my article";
$article->topic = "Hello"; $article->topic = "Hello";

View File

@ -11,7 +11,7 @@ require_once __DIR__ . '/../../TestInit.php';
/** /**
* Tests a self referential many-to-many association mapping (from a model to the same model, without inheritance). * Tests a self referential many-to-many association mapping (from a model to the same model, without inheritance).
* For simplicity the relation duplicates entries in the association table * For simplicity the relation duplicates entries in the association table
* to remain simmetrical. * to remain symmetrical.
*/ */
class ManyToManySelfReferentialAssociationTest extends AbstractManyToManyAssociationTestCase class ManyToManySelfReferentialAssociationTest extends AbstractManyToManyAssociationTestCase
{ {

View File

@ -543,7 +543,7 @@ class NewOperatorTest extends \Doctrine\Tests\OrmFunctionalTestCase
/** /**
* @expectedException Doctrine\ORM\Query\QueryException * @expectedException Doctrine\ORM\Query\QueryException
* @expectedExceptionMessage [Semantical Error] line 0, col 11 near '\stdClass(u.name)': Error: Class "\stdClass" has not a valid contructor. * @expectedExceptionMessage [Semantical Error] line 0, col 11 near '\stdClass(u.name)': Error: Class "\stdClass" has not a valid constructor.
*/ */
public function testInvalidClassConstructorException() public function testInvalidClassConstructorException()
{ {

View File

@ -75,7 +75,7 @@ class OneToManyUnidirectionalAssociationTest extends \Doctrine\Tests\OrmFunction
$exceptionThrown = false; $exceptionThrown = false;
try { try {
// exception depending on the underyling Database Driver // exception depending on the underlying Database Driver
$this->_em->flush(); $this->_em->flush();
} catch(\Exception $e) { } catch(\Exception $e) {
$exceptionThrown = true; $exceptionThrown = true;

View File

@ -64,7 +64,7 @@ class OneToOneOrphanRemovalTest extends \Doctrine\Tests\OrmFunctionalTestCase
$user = new CmsUser; $user = new CmsUser;
$user->status = 'dev'; $user->status = 'dev';
$user->username = 'beberlei'; $user->username = 'beberlei';
$user->name = 'Bejamin Eberlei'; $user->name = 'Benjamin Eberlei';
$email = new CmsEmail; $email = new CmsEmail;
$email->email = 'beberlei@domain.com'; $email->email = 'beberlei@domain.com';

View File

@ -214,7 +214,7 @@ class SingleTableInheritanceTest extends \Doctrine\Tests\OrmFunctionalTestCase
$this->assertContainsOnly('Doctrine\Tests\Models\Company\CompanyContract', $contracts); $this->assertContainsOnly('Doctrine\Tests\Models\Company\CompanyContract', $contracts);
} }
public function testQueryScalarWithDiscrimnatorValue() public function testQueryScalarWithDiscriminatorValue()
{ {
$this->loadFullFixture(); $this->loadFullFixture();
@ -364,7 +364,7 @@ class SingleTableInheritanceTest extends \Doctrine\Tests\OrmFunctionalTestCase
$ref = $this->_em->getReference('Doctrine\Tests\Models\Company\CompanyContract', $this->fix->getId()); $ref = $this->_em->getReference('Doctrine\Tests\Models\Company\CompanyContract', $this->fix->getId());
$this->assertNotInstanceOf('Doctrine\ORM\Proxy\Proxy', $ref, "Cannot Request a proxy from a class that has subclasses."); $this->assertNotInstanceOf('Doctrine\ORM\Proxy\Proxy', $ref, "Cannot Request a proxy from a class that has subclasses.");
$this->assertInstanceOf('Doctrine\Tests\Models\Company\CompanyContract', $ref); $this->assertInstanceOf('Doctrine\Tests\Models\Company\CompanyContract', $ref);
$this->assertInstanceOf('Doctrine\Tests\Models\Company\CompanyFixContract', $ref, "Direct fetch of the reference has to load the child class Emplyoee directly."); $this->assertInstanceOf('Doctrine\Tests\Models\Company\CompanyFixContract', $ref, "Direct fetch of the reference has to load the child class Employee directly.");
$this->_em->clear(); $this->_em->clear();
$ref = $this->_em->getReference('Doctrine\Tests\Models\Company\CompanyFixContract', $this->fix->getId()); $ref = $this->_em->getReference('Doctrine\Tests\Models\Company\CompanyFixContract', $this->fix->getId());
@ -374,7 +374,7 @@ class SingleTableInheritanceTest extends \Doctrine\Tests\OrmFunctionalTestCase
/** /**
* @group DDC-952 * @group DDC-952
*/ */
public function testEagerLoadInheritanceHierachy() public function testEagerLoadInheritanceHierarchy()
{ {
$this->loadFullFixture(); $this->loadFullFixture();

View File

@ -85,7 +85,7 @@ class DDC117Test extends \Doctrine\Tests\OrmFunctionalTestCase
/** /**
* @group DDC-117 * @group DDC-117
*/ */
public function testUpdateAssocationEntity() public function testUpdateAssociationEntity()
{ {
$idCriteria = array('source' => $this->article1->id(), 'target' => $this->article2->id()); $idCriteria = array('source' => $this->article1->id(), 'target' => $this->article2->id());
@ -211,7 +211,7 @@ class DDC117Test extends \Doctrine\Tests\OrmFunctionalTestCase
$exceptionThrown = false; $exceptionThrown = false;
try { try {
// exception depending on the underyling Database Driver // exception depending on the underlying Database Driver
$this->_em->flush(); $this->_em->flush();
} catch(\Exception $e) { } catch(\Exception $e) {
$exceptionThrown = true; $exceptionThrown = true;

View File

@ -29,7 +29,7 @@ class DDC142Test extends \Doctrine\Tests\OrmFunctionalTestCase
} }
} }
public function testCreateRetreaveUpdateDelete() public function testCreateRetrieveUpdateDelete()
{ {
$user = new User; $user = new User;

View File

@ -37,7 +37,7 @@ class DDC1526Test extends \Doctrine\Tests\OrmFunctionalTestCase
LEFT JOIN m.children c"; LEFT JOIN m.children c";
$menus = $this->_em->createQuery($dql)->getResult(); $menus = $this->_em->createQuery($dql)->getResult();
// All Children collection now have to be initiailzed // All Children collection now have to be initialized
foreach ($menus as $menu) { foreach ($menus as $menu) {
$this->assertTrue($menu->children->isInitialized()); $this->assertTrue($menu->children->isInitialized());
} }

View File

@ -25,7 +25,7 @@ class DDC1719Test extends \Doctrine\Tests\OrmFunctionalTestCase
} }
} }
public function testCreateRetreaveUpdateDelete() public function testCreateRetrieveUpdateDelete()
{ {
$e1 = new SimpleEntity('Bar 1'); $e1 = new SimpleEntity('Bar 1');
$e2 = new SimpleEntity('Foo 1'); $e2 = new SimpleEntity('Foo 1');
@ -39,7 +39,7 @@ class DDC1719Test extends \Doctrine\Tests\OrmFunctionalTestCase
$e1Id = $e1->id; $e1Id = $e1->id;
$e2Id = $e2->id; $e2Id = $e2->id;
// Retreave // Retrieve
$e1 = $this->_em->find(self::CLASS_NAME, $e1Id); $e1 = $this->_em->find(self::CLASS_NAME, $e1Id);
$e2 = $this->_em->find(self::CLASS_NAME, $e2Id); $e2 = $this->_em->find(self::CLASS_NAME, $e2Id);

View File

@ -28,7 +28,7 @@ class DDC1843Test extends \Doctrine\Tests\OrmFunctionalTestCase
} }
} }
public function testCreateRetreaveUpdateDelete() public function testCreateRetrieveUpdateDelete()
{ {
$e1 = new Group('Parent Bar 1'); $e1 = new Group('Parent Bar 1');
@ -52,7 +52,7 @@ class DDC1843Test extends \Doctrine\Tests\OrmFunctionalTestCase
$e3Id = $e3->id; $e3Id = $e3->id;
$e4Id = $e4->id; $e4Id = $e4->id;
// Retreave // Retrieve
$e1 = $this->_em->find('Doctrine\Tests\Models\Quote\Group', $e1Id); $e1 = $this->_em->find('Doctrine\Tests\Models\Quote\Group', $e1Id);
$e2 = $this->_em->find('Doctrine\Tests\Models\Quote\Group', $e2Id); $e2 = $this->_em->find('Doctrine\Tests\Models\Quote\Group', $e2Id);
$e3 = $this->_em->find('Doctrine\Tests\Models\Quote\Group', $e3Id); $e3 = $this->_em->find('Doctrine\Tests\Models\Quote\Group', $e3Id);
@ -121,7 +121,7 @@ class DDC1843Test extends \Doctrine\Tests\OrmFunctionalTestCase
$this->assertInstanceOf('Doctrine\Tests\Models\Quote\Group', $e3); $this->assertInstanceOf('Doctrine\Tests\Models\Quote\Group', $e3);
$this->assertInstanceOf('Doctrine\Tests\Models\Quote\Group', $e4); $this->assertInstanceOf('Doctrine\Tests\Models\Quote\Group', $e4);
// Retreave // Retrieve
$e1 = $this->_em->find('Doctrine\Tests\Models\Quote\Group', $e1Id); $e1 = $this->_em->find('Doctrine\Tests\Models\Quote\Group', $e1Id);
$e2 = $this->_em->find('Doctrine\Tests\Models\Quote\Group', $e2Id); $e2 = $this->_em->find('Doctrine\Tests\Models\Quote\Group', $e2Id);
$e3 = $this->_em->find('Doctrine\Tests\Models\Quote\Group', $e3Id); $e3 = $this->_em->find('Doctrine\Tests\Models\Quote\Group', $e3Id);

View File

@ -44,7 +44,7 @@ class DDC1885Test extends \Doctrine\Tests\OrmFunctionalTestCase
} }
public function testCreateRetreaveUpdateDelete() public function testCreateRetrieveUpdateDelete()
{ {
$user = $this->user; $user = $this->user;
$g1 = $user->getGroups()->get(0); $g1 = $user->getGroups()->get(0);
@ -54,7 +54,7 @@ class DDC1885Test extends \Doctrine\Tests\OrmFunctionalTestCase
$g1Id = $g1->id; $g1Id = $g1->id;
$g2Id = $g2->id; $g2Id = $g2->id;
// Retreave // Retrieve
$user = $this->_em->find('Doctrine\Tests\Models\Quote\User', $u1Id); $user = $this->_em->find('Doctrine\Tests\Models\Quote\User', $u1Id);
$this->assertInstanceOf('Doctrine\Tests\Models\Quote\User', $user); $this->assertInstanceOf('Doctrine\Tests\Models\Quote\User', $user);

View File

@ -64,7 +64,7 @@ class DDC501Test extends OrmFunctionalTestCase
$userClone = $this->_em->merge($userClone); $userClone = $this->_em->merge($userClone);
// Back in managed world I would expect to have my phonenumbers back but they aren't! // Back in managed world I would expect to have my phonenumbers back but they aren't!
// Remember I didn't touch (and propably didn't need) them at all while in detached mode. // Remember I didn't touch (and probably didn't need) them at all while in detached mode.
$this->assertEquals(4, count($userClone->getPhonenumbers()), 'Phonenumbers are not available anymore'); $this->assertEquals(4, count($userClone->getPhonenumbers()), 'Phonenumbers are not available anymore');
// This works fine as long as cmUser::groups doesn't cascade "merge" // This works fine as long as cmUser::groups doesn't cascade "merge"

View File

@ -18,7 +18,7 @@ class DDC599Test extends \Doctrine\Tests\OrmFunctionalTestCase
} catch (\Exception $ignored) {} } catch (\Exception $ignored) {}
} }
public function testCascadeRemoveOnInheritanceHierachy() public function testCascadeRemoveOnInheritanceHierarchy()
{ {
$item = new DDC599Subitem; $item = new DDC599Subitem;
$item->elem = "foo"; $item->elem = "foo";

View File

@ -76,7 +76,7 @@ class DDC618Test extends \Doctrine\Tests\OrmFunctionalTestCase
'INNER JOIN A.books B INDEX BY B.title ORDER BY A.name ASC'; 'INNER JOIN A.books B INDEX BY B.title ORDER BY A.name ASC';
$result = $this->_em->createQuery($dql)->getResult(\Doctrine\ORM\Query::HYDRATE_OBJECT); $result = $this->_em->createQuery($dql)->getResult(\Doctrine\ORM\Query::HYDRATE_OBJECT);
$this->assertEquals(3, count($result[0]->books)); // Alice, Joe doesnt appear because he has no books. $this->assertEquals(3, count($result[0]->books)); // Alice, Joe doesn't appear because he has no books.
$this->assertEquals('Alice', $result[0]->name); $this->assertEquals('Alice', $result[0]->name);
$this->assertTrue( isset($result[0]->books["In Wonderland"] ), "Indexing by title should have books by title."); $this->assertTrue( isset($result[0]->books["In Wonderland"] ), "Indexing by title should have books by title.");
$this->assertTrue( isset($result[0]->books["Reloaded"] ), "Indexing by title should have books by title."); $this->assertTrue( isset($result[0]->books["Reloaded"] ), "Indexing by title should have books by title.");
@ -84,7 +84,7 @@ class DDC618Test extends \Doctrine\Tests\OrmFunctionalTestCase
$result = $this->_em->createQuery($dql)->getResult(\Doctrine\ORM\Query::HYDRATE_ARRAY); $result = $this->_em->createQuery($dql)->getResult(\Doctrine\ORM\Query::HYDRATE_ARRAY);
$this->assertEquals(3, count($result[0]['books'])); // Alice, Joe doesnt appear because he has no books. $this->assertEquals(3, count($result[0]['books'])); // Alice, Joe doesn't appear because he has no books.
$this->assertEquals('Alice', $result[0]['name']); $this->assertEquals('Alice', $result[0]['name']);
$this->assertTrue( isset($result[0]['books']["In Wonderland"] ), "Indexing by title should have books by title."); $this->assertTrue( isset($result[0]['books']["In Wonderland"] ), "Indexing by title should have books by title.");
$this->assertTrue( isset($result[0]['books']["Reloaded"] ), "Indexing by title should have books by title."); $this->assertTrue( isset($result[0]['books']["Reloaded"] ), "Indexing by title should have books by title.");
@ -121,7 +121,7 @@ class DDC618Test extends \Doctrine\Tests\OrmFunctionalTestCase
$this->assertArrayHasKey(11, $result); // Alice $this->assertArrayHasKey(11, $result); // Alice
$this->assertEquals(3, count($result[11]->books)); // Alice, Joe doesnt appear because he has no books. $this->assertEquals(3, count($result[11]->books)); // Alice, Joe doesn't appear because he has no books.
$this->assertEquals('Alice', $result[11]->name); $this->assertEquals('Alice', $result[11]->name);
$this->assertTrue( isset($result[11]->books["In Wonderland"] ), "Indexing by title should have books by title."); $this->assertTrue( isset($result[11]->books["In Wonderland"] ), "Indexing by title should have books by title.");
$this->assertTrue( isset($result[11]->books["Reloaded"] ), "Indexing by title should have books by title."); $this->assertTrue( isset($result[11]->books["Reloaded"] ), "Indexing by title should have books by title.");

View File

@ -88,7 +88,7 @@ class DDC758Test extends \Doctrine\Tests\OrmFunctionalTestCase
$cmsUser->addGroup($group1); $cmsUser->addGroup($group1);
$cmsUser->addGroup($group2); $cmsUser->addGroup($group2);
// Cascade merge of cmsUser followed by a flush should add in the birectional new many-to-many associations between the user and the groups // Cascade merge of cmsUser followed by a flush should add in the bidirectional new many-to-many associations between the user and the groups
$this->_em->merge($cmsUser); $this->_em->merge($cmsUser);
$this->_em->flush(); $this->_em->flush();

View File

@ -26,7 +26,7 @@ class DDC933Test extends \Doctrine\Tests\OrmFunctionalTestCase
$manager = new \Doctrine\Tests\Models\Company\CompanyManager(); $manager = new \Doctrine\Tests\Models\Company\CompanyManager();
$manager->setName('beberlei'); $manager->setName('beberlei');
$manager->setSalary(1234); $manager->setSalary(1234);
$manager->setTitle('Vice Precident of This Test'); $manager->setTitle('Vice President of This Test');
$manager->setDepartment("Foo"); $manager->setDepartment("Foo");
$this->_em->persist($manager); $this->_em->persist($manager);

View File

@ -208,7 +208,7 @@ abstract class AbstractMappingDriverTest extends \Doctrine\Tests\OrmTestCase
* @depends testIdentifier * @depends testIdentifier
* @param ClassMetadata $class * @param ClassMetadata $class
*/ */
public function testAssocations($class) public function testAssociations($class)
{ {
$this->assertEquals(3, count($class->associationMappings)); $this->assertEquals(3, count($class->associationMappings));
@ -216,10 +216,10 @@ abstract class AbstractMappingDriverTest extends \Doctrine\Tests\OrmTestCase
} }
/** /**
* @depends testAssocations * @depends testAssociations
* @param ClassMetadata $class * @param ClassMetadata $class
*/ */
public function testOwningOneToOneAssocation($class) public function testOwningOneToOneAssociation($class)
{ {
$this->assertTrue(isset($class->associationMappings['address'])); $this->assertTrue(isset($class->associationMappings['address']));
$this->assertTrue($class->associationMappings['address']['isOwningSide']); $this->assertTrue($class->associationMappings['address']['isOwningSide']);
@ -235,7 +235,7 @@ abstract class AbstractMappingDriverTest extends \Doctrine\Tests\OrmTestCase
} }
/** /**
* @depends testOwningOneToOneAssocation * @depends testOwningOneToOneAssociation
* @param ClassMetadata $class * @param ClassMetadata $class
*/ */
public function testInverseOneToManyAssociation($class) public function testInverseOneToManyAssociation($class)
@ -791,7 +791,7 @@ abstract class AbstractMappingDriverTest extends \Doctrine\Tests\OrmTestCase
$factory = $this->createClassMetadataFactory($em); $factory = $this->createClassMetadataFactory($em);
$ultraClass = $factory->getMetadataFor('Doctrine\Tests\Models\Company\CompanyFlexUltraContract'); $ultraClass = $factory->getMetadataFor('Doctrine\Tests\Models\Company\CompanyFlexUltraContract');
//overrited listeners //overridden listeners
$this->assertArrayHasKey(Events::postPersist, $ultraClass->entityListeners); $this->assertArrayHasKey(Events::postPersist, $ultraClass->entityListeners);
$this->assertArrayHasKey(Events::prePersist, $ultraClass->entityListeners); $this->assertArrayHasKey(Events::prePersist, $ultraClass->entityListeners);

View File

@ -190,7 +190,7 @@ class AnnotationDriverTest extends AbstractMappingDriverTest
/** /**
* @group DDC-1156 * @group DDC-1156
*/ */
public function testMappedSuperclassInMiddleOfInheritanceHierachy() public function testMappedSuperclassInMiddleOfInheritanceHierarchy()
{ {
$annotationDriver = $this->_loadDriver(); $annotationDriver = $this->_loadDriver();

View File

@ -56,7 +56,7 @@ class BasicInheritanceMappingTest extends \Doctrine\Tests\OrmTestCase
/** /**
* @group DDC-869 * @group DDC-869
*/ */
public function testGetMetadataForSubclassWithMappedSuperclassWhithRepository() public function testGetMetadataForSubclassWithMappedSuperclassWithRepository()
{ {
$class = $this->_factory->getMetadataFor('Doctrine\Tests\Models\DDC869\DDC869CreditCardPayment'); $class = $this->_factory->getMetadataFor('Doctrine\Tests\Models\DDC869\DDC869CreditCardPayment');
@ -101,9 +101,9 @@ class BasicInheritanceMappingTest extends \Doctrine\Tests\OrmTestCase
/** /**
* @group DDC-1203 * @group DDC-1203
*/ */
public function testUnmappedSuperclassInHierachy() public function testUnmappedSuperclassInHierarchy()
{ {
$class = $this->_factory->getMetadataFor(__NAMESPACE__ . '\\HierachyD'); $class = $this->_factory->getMetadataFor(__NAMESPACE__ . '\\HierarchyD');
$this->assertTrue(isset($class->fieldMappings['id'])); $this->assertTrue(isset($class->fieldMappings['id']));
$this->assertTrue(isset($class->fieldMappings['a'])); $this->assertTrue(isset($class->fieldMappings['a']));
@ -113,11 +113,11 @@ class BasicInheritanceMappingTest extends \Doctrine\Tests\OrmTestCase
/** /**
* @group DDC-1204 * @group DDC-1204
*/ */
public function testUnmappedEntityInHierachy() public function testUnmappedEntityInHierarchy()
{ {
$this->setExpectedException('Doctrine\ORM\Mapping\MappingException', "Entity 'Doctrine\Tests\ORM\Mapping\HierachyBEntity' has to be part of the discriminator map of 'Doctrine\Tests\ORM\Mapping\HierachyBase' to be properly mapped in the inheritance hierachy. Alternatively you can make 'Doctrine\Tests\ORM\Mapping\HierachyBEntity' an abstract class to avoid this exception from occuring."); $this->setExpectedException('Doctrine\ORM\Mapping\MappingException', "Entity 'Doctrine\Tests\ORM\Mapping\HierarchyBEntity' has to be part of the discriminator map of 'Doctrine\Tests\ORM\Mapping\HierarchyBase' to be properly mapped in the inheritance hierarchy. Alternatively you can make 'Doctrine\Tests\ORM\Mapping\HierarchyBEntity' an abstract class to avoid this exception from occuring.");
$class = $this->_factory->getMetadataFor(__NAMESPACE__ . '\\HierachyE'); $class = $this->_factory->getMetadataFor(__NAMESPACE__ . '\\HierarchyE');
} }
/** /**
@ -148,9 +148,9 @@ class BasicInheritanceMappingTest extends \Doctrine\Tests\OrmTestCase
* @group DDC-1156 * @group DDC-1156
* @group DDC-1218 * @group DDC-1218
*/ */
public function testSequenceDefinitionInHierachyWithSandwichMappedSuperclass() public function testSequenceDefinitionInHierarchyWithSandwichMappedSuperclass()
{ {
$class = $this->_factory->getMetadataFor(__NAMESPACE__ . '\\HierachyD'); $class = $this->_factory->getMetadataFor(__NAMESPACE__ . '\\HierarchyD');
/* @var $class ClassMetadataInfo */ /* @var $class ClassMetadataInfo */
$this->assertInstanceOf('Doctrine\ORM\Id\SequenceGenerator', $class->idGenerator); $this->assertInstanceOf('Doctrine\ORM\Id\SequenceGenerator', $class->idGenerator);
@ -213,12 +213,12 @@ class EntitySubClass2 extends MappedSuperclassBase {
* @InheritanceType("SINGLE_TABLE") * @InheritanceType("SINGLE_TABLE")
* @DiscriminatorColumn(name="type", type="string", length=20) * @DiscriminatorColumn(name="type", type="string", length=20)
* @DiscriminatorMap({ * @DiscriminatorMap({
* "c" = "HierachyC", * "c" = "HierarchyC",
* "d" = "HierachyD", * "d" = "HierarchyD",
* "e" = "HierachyE" * "e" = "HierarchyE"
* }) * })
*/ */
abstract class HierachyBase abstract class HierarchyBase
{ {
/** /**
* @Column(type="integer") @Id @GeneratedValue(strategy="SEQUENCE") * @Column(type="integer") @Id @GeneratedValue(strategy="SEQUENCE")
@ -231,7 +231,7 @@ abstract class HierachyBase
/** /**
* @MappedSuperclass * @MappedSuperclass
*/ */
abstract class HierachyASuperclass extends HierachyBase abstract class HierarchyASuperclass extends HierarchyBase
{ {
/** @Column(type="string") */ /** @Column(type="string") */
public $a; public $a;
@ -240,7 +240,7 @@ abstract class HierachyASuperclass extends HierachyBase
/** /**
* @Entity * @Entity
*/ */
class HierachyBEntity extends HierachyBase class HierarchyBEntity extends HierarchyBase
{ {
/** @Column(type="string") */ /** @Column(type="string") */
public $b; public $b;
@ -249,7 +249,7 @@ class HierachyBEntity extends HierachyBase
/** /**
* @Entity * @Entity
*/ */
class HierachyC extends HierachyBase class HierarchyC extends HierarchyBase
{ {
/** @Column(type="string") */ /** @Column(type="string") */
public $c; public $c;
@ -258,7 +258,7 @@ class HierachyC extends HierachyBase
/** /**
* @Entity * @Entity
*/ */
class HierachyD extends HierachyASuperclass class HierarchyD extends HierarchyASuperclass
{ {
/** @Column(type="string") */ /** @Column(type="string") */
public $d; public $d;
@ -267,7 +267,7 @@ class HierachyD extends HierachyASuperclass
/** /**
* @Entity * @Entity
*/ */
class HierachyE extends HierachyBEntity class HierarchyE extends HierarchyBEntity
{ {
/** @Column(type="string") */ /** @Column(type="string") */
public $e; public $e;

View File

@ -89,7 +89,7 @@ class ClassMetadataFactoryTest extends \Doctrine\Tests\OrmTestCase
$actual = $cmf->getMetadataFor($cm1->name); $actual = $cmf->getMetadataFor($cm1->name);
} }
public function testHasGetMetadata_NamespaceSeperatorIsNotNormalized() public function testHasGetMetadata_NamespaceSeparatorIsNotNormalized()
{ {
require_once __DIR__."/../../Models/Global/GlobalNamespaceModel.php"; require_once __DIR__."/../../Models/Global/GlobalNamespaceModel.php";
@ -325,7 +325,7 @@ class ClassMetadataFactoryTest extends \Doctrine\Tests\OrmTestCase
} }
} }
/* Test subject class with overriden factory method for mocking purposes */ /* Test subject class with overridden factory method for mocking purposes */
class ClassMetadataFactoryTestSubject extends \Doctrine\ORM\Mapping\ClassMetadataFactory class ClassMetadataFactoryTestSubject extends \Doctrine\ORM\Mapping\ClassMetadataFactory
{ {
private $mockMetadata = array(); private $mockMetadata = array();

View File

@ -80,7 +80,7 @@ class ClassMetadataTest extends \Doctrine\Tests\OrmTestCase
/** /**
* @group DDC-115 * @group DDC-115
*/ */
public function testMapAssocationInGlobalNamespace() public function testMapAssociationInGlobalNamespace()
{ {
require_once __DIR__."/../../Models/Global/GlobalNamespaceModel.php"; require_once __DIR__."/../../Models/Global/GlobalNamespaceModel.php";
@ -237,7 +237,7 @@ class ClassMetadataTest extends \Doctrine\Tests\OrmTestCase
$cm->mapField(array('fieldName' => 'name', 'columnName' => 'name')); $cm->mapField(array('fieldName' => 'name', 'columnName' => 'name'));
} }
public function testDuplicateFieldAndAssocationMapping1_ThrowsException() public function testDuplicateFieldAndAssociationMapping1_ThrowsException()
{ {
$cm = new ClassMetadata('Doctrine\Tests\Models\CMS\CmsUser'); $cm = new ClassMetadata('Doctrine\Tests\Models\CMS\CmsUser');
$cm->initializeReflection(new \Doctrine\Common\Persistence\Mapping\RuntimeReflectionService); $cm->initializeReflection(new \Doctrine\Common\Persistence\Mapping\RuntimeReflectionService);
@ -248,7 +248,7 @@ class ClassMetadataTest extends \Doctrine\Tests\OrmTestCase
$cm->mapOneToOne(array('fieldName' => 'name', 'targetEntity' => 'CmsUser')); $cm->mapOneToOne(array('fieldName' => 'name', 'targetEntity' => 'CmsUser'));
} }
public function testDuplicateFieldAndAssocationMapping2_ThrowsException() public function testDuplicateFieldAndAssociationMapping2_ThrowsException()
{ {
$cm = new ClassMetadata('Doctrine\Tests\Models\CMS\CmsUser'); $cm = new ClassMetadata('Doctrine\Tests\Models\CMS\CmsUser');
$cm->initializeReflection(new \Doctrine\Common\Persistence\Mapping\RuntimeReflectionService); $cm->initializeReflection(new \Doctrine\Common\Persistence\Mapping\RuntimeReflectionService);
@ -301,7 +301,7 @@ class ClassMetadataTest extends \Doctrine\Tests\OrmTestCase
$cm = new ClassMetadata('Doctrine\Tests\Models\CMS\CmsAddress'); $cm = new ClassMetadata('Doctrine\Tests\Models\CMS\CmsAddress');
$cm->initializeReflection(new \Doctrine\Common\Persistence\Mapping\RuntimeReflectionService); $cm->initializeReflection(new \Doctrine\Common\Persistence\Mapping\RuntimeReflectionService);
// this is really dirty, but it's the simpliest way to test whether // this is really dirty, but it's the simplest way to test whether
// joinColumn's name will be automatically set to user_id // joinColumn's name will be automatically set to user_id
$cm->mapOneToOne(array( $cm->mapOneToOne(array(
'fieldName' => 'user', 'fieldName' => 'user',
@ -447,7 +447,7 @@ class ClassMetadataTest extends \Doctrine\Tests\OrmTestCase
/** /**
* @group DDC-117 * @group DDC-117
*/ */
public function testInverseIdentifierAssocation() public function testInverseIdentifierAssociation()
{ {
$cm = new ClassMetadata('Doctrine\Tests\Models\DDC117\DDC117ArticleDetails'); $cm = new ClassMetadata('Doctrine\Tests\Models\DDC117\DDC117ArticleDetails');
$cm->initializeReflection(new \Doctrine\Common\Persistence\Mapping\RuntimeReflectionService); $cm->initializeReflection(new \Doctrine\Common\Persistence\Mapping\RuntimeReflectionService);
@ -466,7 +466,7 @@ class ClassMetadataTest extends \Doctrine\Tests\OrmTestCase
/** /**
* @group DDC-117 * @group DDC-117
*/ */
public function testIdentifierAssocationManyToMany() public function testIdentifierAssociationManyToMany()
{ {
$cm = new ClassMetadata('Doctrine\Tests\Models\DDC117\DDC117ArticleDetails'); $cm = new ClassMetadata('Doctrine\Tests\Models\DDC117\DDC117ArticleDetails');
$cm->initializeReflection(new \Doctrine\Common\Persistence\Mapping\RuntimeReflectionService); $cm->initializeReflection(new \Doctrine\Common\Persistence\Mapping\RuntimeReflectionService);
@ -825,7 +825,7 @@ class ClassMetadataTest extends \Doctrine\Tests\OrmTestCase
$cm->mapManyToOne(array('fieldName' => 'address', 'targetEntity' => 'UnknownClass')); $cm->mapManyToOne(array('fieldName' => 'address', 'targetEntity' => 'UnknownClass'));
$this->setExpectedException("Doctrine\ORM\Mapping\MappingException", "The target-entity Doctrine\Tests\Models\CMS\UnknownClass cannot be found in 'Doctrine\Tests\Models\CMS\CmsUser#address'."); $this->setExpectedException("Doctrine\ORM\Mapping\MappingException", "The target-entity Doctrine\Tests\Models\CMS\UnknownClass cannot be found in 'Doctrine\Tests\Models\CMS\CmsUser#address'.");
$cm->validateAssocations(); $cm->validateAssociations();
} }
/** /**

View File

@ -11,7 +11,7 @@ use Doctrine\Tests\Mocks\HydratorMockStatement,
/** /**
* Tests to prevent serious performance regressions. * Tests to prevent serious performance regressions.
* *
* IMPORTANT: Be sure to run these tests withoug xdebug or similar tools that * IMPORTANT: Be sure to run these tests without xdebug or similar tools that
* seriously degrade performance. * seriously degrade performance.
* *
* @author robo * @author robo

View File

@ -197,7 +197,7 @@ class SelectSqlGenerationTest extends \Doctrine\Tests\OrmTestCase
} }
/* NOT (YET?) SUPPORTED. /* NOT (YET?) SUPPORTED.
Can be supported if SimpleSelectExpresion supports SingleValuedPathExpression instead of StateFieldPathExpression. Can be supported if SimpleSelectExpression supports SingleValuedPathExpression instead of StateFieldPathExpression.
public function testSingleAssociationPathExpressionInSubselect() public function testSingleAssociationPathExpressionInSubselect()
{ {

View File

@ -128,7 +128,7 @@ class UpdateSqlGenerationTest extends \Doctrine\Tests\OrmTestCase
); );
} }
public function testSupportsGreatherThanClause() public function testSupportsGreaterThanClause()
{ {
$this->assertSqlGeneration( $this->assertSqlGeneration(
'UPDATE Doctrine\Tests\Models\CMS\CmsUser u SET u.status = ?1 WHERE u.id > ?2', 'UPDATE Doctrine\Tests\Models\CMS\CmsUser u SET u.status = ?1 WHERE u.id > ?2',
@ -136,7 +136,7 @@ class UpdateSqlGenerationTest extends \Doctrine\Tests\OrmTestCase
); );
} }
public function testSupportsGreatherThanOrEqualToClause() public function testSupportsGreaterThanOrEqualToClause()
{ {
$this->assertSqlGeneration( $this->assertSqlGeneration(
'UPDATE Doctrine\Tests\Models\CMS\CmsUser u SET u.status = ?1 WHERE u.id >= ?2', 'UPDATE Doctrine\Tests\Models\CMS\CmsUser u SET u.status = ?1 WHERE u.id >= ?2',

View File

@ -355,7 +355,7 @@ abstract class AbstractClassMetadataExporterTest extends \Doctrine\Tests\OrmTest
$this->assertEquals('all', $value['Doctrine\Tests\ORM\Tools\Export\ExportedUser']['oneToMany']['interests']['cascade'][0]); $this->assertEquals('all', $value['Doctrine\Tests\ORM\Tools\Export\ExportedUser']['oneToMany']['interests']['cascade'][0]);
} else { } else {
$this->markTestSkipped('Test aviable only for '.$type.' dirver'); $this->markTestSkipped('Test available only for '.$type.' driver');
} }
} }
public function __destruct() public function __destruct()

View File

@ -11,7 +11,7 @@ require_once __DIR__ . '/../../TestInit.php';
class SchemaToolTest extends \Doctrine\Tests\OrmTestCase class SchemaToolTest extends \Doctrine\Tests\OrmTestCase
{ {
public function testAddUniqueIndexForUniqueFieldAnnocation() public function testAddUniqueIndexForUniqueFieldAnnotation()
{ {
$em = $this->_getTestEntityManager(); $em = $this->_getTestEntityManager();
$schemaTool = new SchemaTool($em); $schemaTool = new SchemaTool($em);

View File

@ -237,7 +237,7 @@ abstract class OrmFunctionalTestCase extends OrmTestCase
} }
if (isset($this->_usedModelSets['directorytree'])) { if (isset($this->_usedModelSets['directorytree'])) {
$conn->executeUpdate('DELETE FROM ' . $this->_em->getConnection()->getDatabasePlatform()->quoteIdentifier("file")); $conn->executeUpdate('DELETE FROM ' . $this->_em->getConnection()->getDatabasePlatform()->quoteIdentifier("file"));
// MySQL doesnt know deferred deletions therefore only executing the second query gives errors. // MySQL doesn't know deferred deletions therefore only executing the second query gives errors.
$conn->executeUpdate('DELETE FROM Directory WHERE parentDirectory_id IS NOT NULL'); $conn->executeUpdate('DELETE FROM Directory WHERE parentDirectory_id IS NOT NULL');
$conn->executeUpdate('DELETE FROM Directory'); $conn->executeUpdate('DELETE FROM Directory');
} }

View File

@ -16,7 +16,7 @@ require_once 'PHPUnit/Framework.php';
/** /**
* A more flexible and powerful PHPUnit Task than the native Phing one. * A more flexible and powerful PHPUnit Task than the native Phing one.
* *
* Plus forward compability for PHPUnit 3.5 and later is ensured by using the PHPUnit Test Runner instead of implementing one. * Plus forward compatibility for PHPUnit 3.5 and later is ensured by using the PHPUnit Test Runner instead of implementing one.
* *
* @author Benjamin Eberlei <kontakt@beberlei.de> * @author Benjamin Eberlei <kontakt@beberlei.de>
*/ */

View File

@ -2,7 +2,7 @@
<!-- <!--
Use this configuration file as a template to run the tests against any dbms. Use this configuration file as a template to run the tests against any dbms.
Procedure: Procedure:
1) Save a copy of this file with a name of your chosing. It doesn't matter 1) Save a copy of this file with a name of your choosing. It doesn't matter
where you place it as long as you know where it is. where you place it as long as you know where it is.
i.e. "mysqlconf.xml" (It needs the ending .xml). i.e. "mysqlconf.xml" (It needs the ending .xml).
2) Edit the file and fill in your settings (database name, type, username, etc.) 2) Edit the file and fill in your settings (database name, type, username, etc.)