@@ 914-928 (lines=15) @@ | ||
911 | * @expectedException \InvalidArgumentException |
|
912 | * @expectedExceptionMessage EntityListenerServiceResolver |
|
913 | */ |
|
914 | public function testLazyEntityListenerResolverWithoutCorrectInterface() |
|
915 | { |
|
916 | if (version_compare(Version::VERSION, '2.5.0-DEV') < 0) { |
|
917 | $this->markTestSkipped('Attaching entity listeners by tag requires doctrine-orm 2.5.0 or newer'); |
|
918 | } |
|
919 | ||
920 | $container = $this->getContainer([]); |
|
921 | $loader = new DoctrineExtension(); |
|
922 | $container->registerExtension($loader); |
|
923 | $container->addCompilerPass(new EntityListenerPass()); |
|
924 | ||
925 | $this->loadFromFile($container, 'orm_entity_listener_lazy_resolver_without_interface'); |
|
926 | ||
927 | $this->compileContainer($container); |
|
928 | } |
|
929 | ||
930 | public function testPrivateLazyEntityListener() |
|
931 | { |
|
@@ 952-966 (lines=15) @@ | ||
949 | * @expectedException \InvalidArgumentException |
|
950 | * @expectedExceptionMessageRegExp /The service ".*" must not be abstract as this entity listener is lazy-loaded/ |
|
951 | */ |
|
952 | public function testAbstractLazyEntityListener() |
|
953 | { |
|
954 | if (version_compare(Version::VERSION, '2.5.0-DEV') < 0) { |
|
955 | $this->markTestSkipped('Attaching entity listeners by tag requires doctrine-orm 2.5.0 or newer'); |
|
956 | } |
|
957 | ||
958 | $container = $this->getContainer([]); |
|
959 | $loader = new DoctrineExtension(); |
|
960 | $container->registerExtension($loader); |
|
961 | $container->addCompilerPass(new EntityListenerPass()); |
|
962 | ||
963 | $this->loadFromFile($container, 'orm_entity_listener_lazy_abstract'); |
|
964 | ||
965 | $this->compileContainer($container); |
|
966 | } |
|
967 | ||
968 | public function testRepositoryFactory() |
|
969 | { |