aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/tests/event_dispatcher/event_dispatcher_test.rs
blob: 2222c3fd7357b43674475a956fb751f5f7afbe83 (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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
//! ref: composer/tests/Composer/Test/EventDispatcher/EventDispatcherTest.php

use shirabe::util::platform::Platform;

fn tear_down() {
    Platform::clear_env("COMPOSER_SKIP_SCRIPTS");
}

struct TearDown;

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

// These build an EventDispatcher with a mocked Composer/IO/ProcessExecutor and run script
// listeners (executing CLI/PHP callbacks); mocking and the script-execution machinery are
// not available here.
#[test]
#[ignore = "requires PHPUnit getMockBuilder onlyMethods(getListeners) override and getIOMock, which have no Rust equivalent"]
fn test_listener_exceptions_are_caught() {
    let _tear_down = TearDown;
    todo!()
}

#[test]
#[ignore = "requires getProcessExecutorMock and getMockBuilder onlyMethods(getListeners) override, which have no Rust equivalent"]
fn test_dispatcher_can_execute_single_command_line_script() {
    let _tear_down = TearDown;
    todo!()
}

#[test]
#[ignore = "requires getMockBuilder mocks for AutoloadGenerator/RepositoryManager/RootPackageInterface/Event, which have no Rust equivalent"]
fn test_dispatcher_pass_dev_mode_to_autoload_generator_for_script_events() {
    let _tear_down = TearDown;
    todo!()
}

#[test]
#[ignore = "requires getMockBuilder mocks for RepositoryManager/InstallationManager and PHP callable listeners ([\\$this, 'method']), which have no Rust equivalent"]
fn test_dispatcher_remove_listener() {
    let _tear_down = TearDown;
    todo!()
}

#[test]
#[ignore = "requires getProcessExecutorMock and getMockBuilder onlyMethods(getListeners) override, which have no Rust equivalent"]
fn test_dispatcher_can_execute_cli_and_php_in_same_event_script_stack() {
    let _tear_down = TearDown;
    todo!()
}

#[test]
#[ignore = "requires getProcessExecutorMock and getMockBuilder onlyMethods(getListeners) override, which have no Rust equivalent"]
fn test_dispatcher_can_put_env() {
    let _tear_down = TearDown;
    todo!()
}

#[test]
#[ignore = "requires getProcessExecutorMock and getMockBuilder onlyMethods(getListeners) override, which have no Rust equivalent"]
fn test_dispatcher_appends_dir_bin_on_path_for_every_listener() {
    let _tear_down = TearDown;
    todo!()
}

#[test]
#[ignore = "requires getProcessExecutorMock, getMockBuilder onlyMethods(getListeners) override and ReflectionMethod(getPhpExecCommand), which have no Rust equivalent"]
fn test_dispatcher_support_for_additional_args() {
    let _tear_down = TearDown;
    todo!()
}

#[test]
#[ignore = "requires getProcessExecutorMock and getMockBuilder onlyMethods(getListeners) returnCallback override, which have no Rust equivalent"]
fn test_dispatcher_can_execute_composer_script_groups() {
    let _tear_down = TearDown;
    todo!()
}

#[test]
#[ignore = "requires getProcessExecutorMock and getMockBuilder onlyMethods(getListeners) returnCallback override, which have no Rust equivalent"]
fn test_recursion_in_scripts_names() {
    let _tear_down = TearDown;
    todo!()
}

#[test]
#[ignore = "requires getProcessExecutorMock, getIOMock and getMockBuilder onlyMethods(getListeners) returnCallback override, which have no Rust equivalent"]
fn test_dispatcher_detect_infinite_recursion() {
    let _tear_down = TearDown;
    todo!()
}

#[test]
#[ignore = "requires getMockBuilder IOInterface mock with writeError/writeRaw expectations and onlyMethods(getListeners) override, which have no Rust equivalent"]
fn test_dispatcher_outputs_command() {
    let _tear_down = TearDown;
    todo!()
}

#[test]
#[ignore = "requires getIOMock and getMockBuilder onlyMethods(getListeners) override, which have no Rust equivalent"]
fn test_dispatcher_outputs_error_on_failed_command() {
    let _tear_down = TearDown;
    todo!()
}

#[test]
#[ignore = "requires getProcessExecutorMock, getMockBuilder onlyMethods(getListeners) override and LockTransaction mock, which have no Rust equivalent"]
fn test_dispatcher_installer_events() {
    let _tear_down = TearDown;
    todo!()
}

#[test]
#[ignore = "requires getMockBuilder mocks for RootPackageInterface and Event, which have no Rust equivalent"]
fn test_dispatcher_doesnt_return_skipped_scripts() {
    let _tear_down = TearDown;
    todo!()
}