claviron-php-embed 0.2.0-alpha.20

Managed in-process PHP execution, application hosting, and native extensions for Claviron
use std::path::Path;

/// Existing, deliberately non-runnable input for configuration-only tests.
pub(crate) struct ScriptFixture(tempfile::NamedTempFile);

impl ScriptFixture {
    pub(crate) fn new() -> Self {
        let file = tempfile::NamedTempFile::new().unwrap();
        std::fs::write(
            file.path(),
            include_str!("fixtures/config/program.php"),
        )
        .unwrap();
        Self(file)
    }

    pub(crate) fn path(&self) -> &Path {
        self.0.path()
    }
}