1
0
mirror of synced 2025-02-02 21:41:45 +03:00

Test annotation driver with failing SLC mapping

This commit is contained in:
Asmir Mustafic 2015-06-20 14:24:01 +02:00
parent 012367a371
commit 5f2922b3a7

View File

@ -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;
}