()
| 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() { |
nothing calls this directly
no test coverage detected