MCPcopy Create free account
hub / github.com/PHPantom-dev/phpantom_lsp / strategy_explicit_commands

Function strategy_explicit_commands

src/formatting.rs:670–688  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

668
669 #[test]
670 fn strategy_explicit_commands() {
671 let config = FormattingConfig {
672 pint: None,
673 php_cs_fixer: Some("/usr/bin/php-cs-fixer".to_string()),
674 phpcbf: Some("/usr/bin/phpcbf".to_string()),
675 timeout: None,
676 };
677 let strategy = resolve_strategy(None, &config, None, None);
678 match &strategy {
679 FormattingStrategy::External(tools) => {
680 assert_eq!(tools.len(), 2);
681 assert_eq!(tools[0].name, "php-cs-fixer");
682 assert_eq!(tools[0].path, PathBuf::from("/usr/bin/php-cs-fixer"));
683 assert_eq!(tools[1].name, "phpcbf");
684 assert_eq!(tools[1].path, PathBuf::from("/usr/bin/phpcbf"));
685 }
686 other => panic!("Expected External, got {:?}", other),
687 }
688 }
689
690 #[test]
691 fn strategy_one_explicit_one_disabled() {

Callers

nothing calls this directly

Calls 1

resolve_strategyFunction · 0.85

Tested by

no test coverage detected