Beispiel #1
0
 public function testCanModifyDoesNotAcceptAFormatThatCanNotBeParsed()
 {
     $file = m::mock(FileNodeInterface::class, FormatAwareInterface::class);
     $file->shouldReceive('exists')->andReturn(true);
     $format = m::mock(FormatInterface::class);
     $this->parserFactory->shouldReceive('getParser')->with($format)->andReturn(null);
     $file->shouldReceive('getFormat')->andReturn($format);
     static::assertFalse($this->reFormatter->canModify($file));
 }