public function testCreateFromData() { $file = new \SplFileInfo(__DIR__ . '/Fixtures/fixed_width.txt'); $lines = explode("\n", file_get_contents($file->getRealPath())); $this->assertEquals(new InMemoryFile($file->getFilename(), strlen($lines[0]), $lines, "\n"), $this->factory->createFromFile($file, "\n")); }
public function createFromFileAndSpec(\SplFileInfo $file, $specName) { return parent::createFromFile($file, $this->specLoader->loadSpec($specName)->getLineSeparator()); }