File tree Expand file tree Collapse file tree 2 files changed +3
-13
lines changed
Bundle/FrameworkBundle/Tests/DependencyInjection
Component/Validator/Tests Expand file tree Collapse file tree 2 files changed +3
-13
lines changed Original file line number Diff line number Diff line change 12
12
namespace Symfony \Bundle \FrameworkBundle \Tests \DependencyInjection ;
13
13
14
14
use Doctrine \Common \Annotations \Annotation ;
15
- use Doctrine \Common \Annotations \PsrCachedReader ;
16
15
use Psr \Cache \CacheItemPoolInterface ;
17
16
use Psr \Log \LoggerAwareInterface ;
18
17
use Symfony \Bridge \PhpUnit \ExpectDeprecationTrait ;
@@ -1093,7 +1092,7 @@ public function testAnnotations()
1093
1092
$ container ->compile ();
1094
1093
1095
1094
$ this ->assertEquals ($ container ->getParameter ('kernel.cache_dir ' ).'/annotations ' , $ container ->getDefinition ('annotations.filesystem_cache_adapter ' )->getArgument (2 ));
1096
- $ this ->assertSame (class_exists (PsrCachedReader::class) ? 'annotations.filesystem_cache_adapter ' : ' annotations.filesystem_cache ' , (string ) $ container ->getDefinition ('annotation_reader ' )->getArgument (1 ));
1095
+ $ this ->assertSame ('annotations.filesystem_cache_adapter ' , (string ) $ container ->getDefinition ('annotation_reader ' )->getArgument (1 ));
1097
1096
}
1098
1097
1099
1098
public function testFileLinkFormat ()
Original file line number Diff line number Diff line change 11
11
12
12
namespace Symfony \Component \Validator \Tests ;
13
13
14
- use Doctrine \Common \Annotations \CachedReader ;
15
14
use Doctrine \Common \Annotations \PsrCachedReader ;
16
15
use Doctrine \Common \Annotations \Reader ;
17
16
use PHPUnit \Framework \TestCase ;
@@ -100,11 +99,7 @@ public function testEnableAnnotationMapping()
100
99
$ r = new \ReflectionProperty (AnnotationLoader::class, 'reader ' );
101
100
$ r ->setAccessible (true );
102
101
103
- if (class_exists (PsrCachedReader::class)) {
104
- $ this ->assertInstanceOf (PsrCachedReader::class, $ r ->getValue ($ loaders [0 ]));
105
- } else {
106
- $ this ->assertInstanceOf (CachedReader::class, $ r ->getValue ($ loaders [0 ]));
107
- }
102
+ $ this ->assertInstanceOf (PsrCachedReader::class, $ r ->getValue ($ loaders [0 ]));
108
103
}
109
104
110
105
public function testEnableAnnotationMappingWithDefaultDoctrineAnnotationReader ()
@@ -119,11 +114,7 @@ public function testEnableAnnotationMappingWithDefaultDoctrineAnnotationReader()
119
114
$ r = new \ReflectionProperty (AnnotationLoader::class, 'reader ' );
120
115
$ r ->setAccessible (true );
121
116
122
- if (class_exists (PsrCachedReader::class)) {
123
- $ this ->assertInstanceOf (PsrCachedReader::class, $ r ->getValue ($ loaders [0 ]));
124
- } else {
125
- $ this ->assertInstanceOf (CachedReader::class, $ r ->getValue ($ loaders [0 ]));
126
- }
117
+ $ this ->assertInstanceOf (PsrCachedReader::class, $ r ->getValue ($ loaders [0 ]));
127
118
}
128
119
129
120
/**
You can’t perform that action at this time.
0 commit comments