Create a PHP file at the given relative path with minimal content.
(&self, relative_path: &str, content: &str)
| 25 | |
| 26 | /// Create a PHP file at the given relative path with minimal content. |
| 27 | fn create_php_file(&self, relative_path: &str, content: &str) { |
| 28 | let full_path = self.dir.path().join(relative_path); |
| 29 | if let Some(parent) = full_path.parent() { |
| 30 | fs::create_dir_all(parent).expect("failed to create dirs"); |
| 31 | } |
| 32 | fs::write(&full_path, content).expect("failed to write PHP file"); |
| 33 | } |
| 34 | } |
| 35 | |
| 36 | #[test] |
no outgoing calls