aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/tests/common
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe/tests/common')
-rw-r--r--crates/shirabe/tests/common/config_stub.rs5
-rw-r--r--crates/shirabe/tests/common/http_downloader_mock.rs5
-rw-r--r--crates/shirabe/tests/common/io_mock.rs7
-rw-r--r--crates/shirabe/tests/common/process_executor_mock.rs5
4 files changed, 9 insertions, 13 deletions
diff --git a/crates/shirabe/tests/common/config_stub.rs b/crates/shirabe/tests/common/config_stub.rs
index 7566b89..bf81462 100644
--- a/crates/shirabe/tests/common/config_stub.rs
+++ b/crates/shirabe/tests/common/config_stub.rs
@@ -8,12 +8,11 @@
//! real resolution logic instead of intercepting `get`.
#![allow(dead_code)]
-use std::cell::RefCell;
-use std::rc::Rc;
-
use indexmap::IndexMap;
use shirabe::config::Config;
use shirabe_php_shim::PhpMixed;
+use std::cell::RefCell;
+use std::rc::Rc;
pub struct ConfigStubBuilder {
use_environment: bool,
diff --git a/crates/shirabe/tests/common/http_downloader_mock.rs b/crates/shirabe/tests/common/http_downloader_mock.rs
index 7a021f9..85d3ec8 100644
--- a/crates/shirabe/tests/common/http_downloader_mock.rs
+++ b/crates/shirabe/tests/common/http_downloader_mock.rs
@@ -1,9 +1,6 @@
//! ref: composer/tests/Composer/Test/Mock/HttpDownloaderMock.php
#![allow(dead_code)]
-use std::cell::RefCell;
-use std::rc::Rc;
-
use indexmap::IndexMap;
use shirabe::config::Config;
use shirabe::io::IOInterface;
@@ -12,6 +9,8 @@ use shirabe::util::http_downloader::{
HttpDownloader, HttpDownloaderMockExpectation, HttpDownloaderMockHandler,
};
use shirabe_php_shim::PhpMixed;
+use std::cell::RefCell;
+use std::rc::Rc;
// A single HTTP request expectation as written in the PHP tests: a `url` plus an
// optional response (`status`/`body`/`headers`). `options` of `None` matches any
diff --git a/crates/shirabe/tests/common/io_mock.rs b/crates/shirabe/tests/common/io_mock.rs
index bdbe7b3..7b932a8 100644
--- a/crates/shirabe/tests/common/io_mock.rs
+++ b/crates/shirabe/tests/common/io_mock.rs
@@ -1,9 +1,5 @@
//! ref: composer/tests/Composer/Test/Mock/IOMock.php
-use std::cell::RefCell;
-use std::collections::VecDeque;
-use std::rc::Rc;
-
use shirabe::config::Config;
use shirabe::io::buffer_io::BufferIO;
use shirabe::io::io_interface;
@@ -12,6 +8,9 @@ use shirabe::util::platform::Platform;
use shirabe_external_packages::composer::pcre::Preg;
use shirabe_external_packages::symfony::console::output::output_interface;
use shirabe_php_shim::{PHP_EOL, PhpMixed, preg_quote};
+use std::cell::RefCell;
+use std::collections::VecDeque;
+use std::rc::Rc;
// A single entry of the IO expectation list. PHP models these as associative
// arrays (`{text, regex?}` / `{ask, reply}` / `{auth: [repo, user, pass]}`); the
diff --git a/crates/shirabe/tests/common/process_executor_mock.rs b/crates/shirabe/tests/common/process_executor_mock.rs
index b81c8bb..698d8d2 100644
--- a/crates/shirabe/tests/common/process_executor_mock.rs
+++ b/crates/shirabe/tests/common/process_executor_mock.rs
@@ -1,10 +1,9 @@
//! ref: composer/tests/Composer/Test/Mock/ProcessExecutorMock.php
-use std::cell::RefCell;
-use std::rc::Rc;
-
use shirabe::util::process_executor::{MockExpectation, MockHandler, ProcessExecutor};
use shirabe_php_shim::PhpMixed;
+use std::cell::RefCell;
+use std::rc::Rc;
// A command expectation as written in the PHP tests: either a bare command
// (`'git command'` / `['git', '--version']`) or the full