diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-06-28 17:45:06 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-06-28 17:45:26 +0900 |
| commit | 53f1fb395f33e0fb8db9aebd09ea9082f650f9f1 (patch) | |
| tree | f9e8bf0e9d4b1e98cce383574fb6a13b684fff08 /crates/shirabe/tests/common | |
| parent | 212f5cd75b1403ee75ffa44d7ebdb181174340c0 (diff) | |
| download | php-shirabe-53f1fb395f33e0fb8db9aebd09ea9082f650f9f1.tar.gz php-shirabe-53f1fb395f33e0fb8db9aebd09ea9082f650f9f1.tar.zst php-shirabe-53f1fb395f33e0fb8db9aebd09ea9082f650f9f1.zip | |
refactor: add linter
Diffstat (limited to 'crates/shirabe/tests/common')
| -rw-r--r-- | crates/shirabe/tests/common/config_stub.rs | 5 | ||||
| -rw-r--r-- | crates/shirabe/tests/common/http_downloader_mock.rs | 5 | ||||
| -rw-r--r-- | crates/shirabe/tests/common/io_mock.rs | 7 | ||||
| -rw-r--r-- | crates/shirabe/tests/common/process_executor_mock.rs | 5 |
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 |
