aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/tests/installer/binary_installer_test.rs
blob: 7bd5eea552ad7d94ebb5456a411dffc1add6631a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
//! ref: composer/tests/Composer/Test/Installer/BinaryInstallerTest.php

/// Creates the root/vendor/bin temp directories and a mocked IO. The temp-dir
/// helpers (`getUniqueTmpDirectory`/`ensureDirectoryExistsAndClear`) and the IO
/// mock are not available here, so this remains a stub.
fn set_up() {
    todo!()
}

/// Removes the root dir created by `set_up`, which is itself a stub.
fn tear_down() {
    todo!()
}

struct TearDown;

impl Drop for TearDown {
    fn drop(&mut self) {
        tear_down();
    }
}

// This installs a PHP binary and then executes it via ProcessExecutor, asserting the
// program's output. It needs a real PHP runtime, the binary-proxy generation, and a
// mocked Package's getBinaries(), none of which are available here.
#[test]
#[ignore = "needs PHPUnit getMockBuilder mocks of IOInterface and Package::getBinaries() plus a real PHP runtime to execute the installed binary and assert its output"]
fn test_install_and_exec_binary_with_full_compat() {
    todo!()
}