public function testBugFunctionsLines() { $lines = FileModifier::file('examples/usuarios.php')->getFunctionLines('database'); $this->assertEquals(33, $lines['starts']); $this->assertEquals(39, $lines['finish']); $lines = FileModifier::file('examples/controller.php')->getFunctionLines('getList'); $this->assertEquals(52, $lines['starts']); $this->assertEquals(57, $lines['finish']); $lines = FileModifier::file('examples/controller.php')->getFunctionLines('getSee'); $this->assertFalse($lines); }
public function testCreateFile() { $file = 'borrar.txt'; $this->assertFalse(FileModifier::file($file)->exists()); $found = FileModifier::file($file)->create('Hola'); $this->assertTrue(FileModifier::file($file)->exists()); unlink($file); }