|
@@ 28-36 (lines=9) @@
|
| 25 |
|
|
| 26 |
|
class CacheWarmerTest extends TestCase |
| 27 |
|
{ |
| 28 |
|
public function testWarmUpRecursive() |
| 29 |
|
{ |
| 30 |
|
$metadataFactory = $this->createMock(MetadataFactoryInterface::class); |
| 31 |
|
$metadataFactory->expects($this->exactly(3)) |
| 32 |
|
->method('getMetadataForClass'); |
| 33 |
|
|
| 34 |
|
$warmer = new CacheWarmer([__DIR__ . "/Files"], $metadataFactory); |
| 35 |
|
$warmer->warmUp("foo"); |
| 36 |
|
} |
| 37 |
|
|
| 38 |
|
public function testWarmUpRecursiveWithInclusion() |
| 39 |
|
{ |
|
@@ 38-46 (lines=9) @@
|
| 35 |
|
$warmer->warmUp("foo"); |
| 36 |
|
} |
| 37 |
|
|
| 38 |
|
public function testWarmUpRecursiveWithInclusion() |
| 39 |
|
{ |
| 40 |
|
$metadataFactory = $this->createMock(MetadataFactoryInterface::class); |
| 41 |
|
$metadataFactory->expects($this->exactly(1)) |
| 42 |
|
->method('getMetadataForClass')->with(BarBar::class); |
| 43 |
|
|
| 44 |
|
$warmer = new CacheWarmer([__DIR__ . "/Files/Ba*"], $metadataFactory); |
| 45 |
|
$warmer->warmUp("foo"); |
| 46 |
|
} |
| 47 |
|
|
| 48 |
|
public function testWarmUpRecursiveWithExclusion() |
| 49 |
|
{ |
|
@@ 48-56 (lines=9) @@
|
| 45 |
|
$warmer->warmUp("foo"); |
| 46 |
|
} |
| 47 |
|
|
| 48 |
|
public function testWarmUpRecursiveWithExclusion() |
| 49 |
|
{ |
| 50 |
|
$metadataFactory = $this->createMock(MetadataFactoryInterface::class); |
| 51 |
|
$metadataFactory->expects($this->exactly(2)) |
| 52 |
|
->method('getMetadataForClass'); |
| 53 |
|
|
| 54 |
|
$warmer = new CacheWarmer([__DIR__ . "/Files"], $metadataFactory, ["Bar"]); |
| 55 |
|
$warmer->warmUp("foo"); |
| 56 |
|
} |
| 57 |
|
} |
| 58 |
|
|
| 59 |
|
|