|
@@ 19-25 (lines=7) @@
|
| 16 |
|
/** |
| 17 |
|
* @covers TextFile\Factory\WriterFactory::createWriter |
| 18 |
|
*/ |
| 19 |
|
public function testCreateWriter() |
| 20 |
|
{ |
| 21 |
|
$writerFactory = new WriterFactory(); |
| 22 |
|
|
| 23 |
|
$this->assertInstanceOf(PrependingWriter::class, $writerFactory->createWriter(PrependingWriter::class)); |
| 24 |
|
$this->assertInstanceOf(ErasingWriter::class, $writerFactory->createWriter(ErasingWriter::class)); |
| 25 |
|
} |
| 26 |
|
|
| 27 |
|
/** |
| 28 |
|
* @covers TextFile\Factory\WriterFactory::createWriter |
|
@@ 30-36 (lines=7) @@
|
| 27 |
|
/** |
| 28 |
|
* @covers TextFile\Factory\WriterFactory::createWriter |
| 29 |
|
*/ |
| 30 |
|
public function testCreateWriterSingleton() |
| 31 |
|
{ |
| 32 |
|
$writerFactory = new WriterFactory(); |
| 33 |
|
|
| 34 |
|
$this->assertEquals($writerFactory->createWriter(PrependingWriter::class), $writerFactory->createWriter(PrependingWriter::class)); |
| 35 |
|
$this->assertEquals($writerFactory->createWriter(ErasingWriter::class), $writerFactory->createWriter(ErasingWriter::class)); |
| 36 |
|
} |
| 37 |
|
|
| 38 |
|
/** |
| 39 |
|
* @covers TextFile\Factory\WriterFactory::createWriter |