Test annotation driver with failing SLC mapping
This commit is contained in:
parent
012367a371
commit
5f2922b3a7
@ -23,6 +23,19 @@ class AnnotationDriverTest extends AbstractMappingDriverTest
|
||||
$annotationDriver->loadMetadataForClass('stdClass', $cm);
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException Doctrine\ORM\Cache\CacheException
|
||||
* @expectedExceptionMessage Entity association field "Doctrine\Tests\ORM\Mapping\AnnotationSLC#foo" not configured as part of the second-level cache.
|
||||
*/
|
||||
public function testFailingSecondLevelCacheAssociation()
|
||||
{
|
||||
$className = 'Doctrine\Tests\ORM\Mapping\AnnotationSLC';
|
||||
$mappingDriver = $this->_loadDriver();
|
||||
|
||||
$class = new ClassMetadata($className);
|
||||
$mappingDriver->loadMetadataForClass($className, $class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @group DDC-268
|
||||
*/
|
||||
@ -351,3 +364,26 @@ class InvalidFetchOption
|
||||
*/
|
||||
private $collection;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Entity
|
||||
* @Cache
|
||||
*/
|
||||
class AnnotationSLC
|
||||
{
|
||||
/**
|
||||
* @Id
|
||||
* @ManyToOne(targetEntity="AnnotationSLCFoo")
|
||||
*/
|
||||
public $foo;
|
||||
}
|
||||
/**
|
||||
* @Entity
|
||||
*/
|
||||
class AnnotationSLCFoo
|
||||
{
|
||||
/**
|
||||
* @Column(type="string")
|
||||
*/
|
||||
public $id;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user