Laravel + Homestead(Vagrant) + PhpStorm에서 PHPUnit 실행 시 "Cannot find PHPUnit in include path (.:/usr/share/php)"가 나오는 문제
환경
시도한 일
PhpStorm에서 PHPUnit을 실행하고 싶습니다.
그러나 php는 로컬이 아니며 원격 (Homestead)에서 php를 실행해야합니다.
 현상
위 환경에서 PhpStorm에서 PHPUnit을 실행하면Cannot find PHPUnit in include path (.:/usr/share/php) 오류가 발생함
 
 해결 방법
위 환경에서 PhpStorm에서 PHPUnit을 실행하면
Cannot find PHPUnit in include path (.:/usr/share/php) 오류가 발생함
해결 방법
composer install --dev
composer dumpautoload
Ctrl + Alt + S 에서 설정 화면을 열고 Test Frameworks+ 버튼을 눌러 설정을 추가하고 CLI Interpriter 의 오른쪽에 있는 ・・・ 를 눌러vagrant를 통해 원격 (Homestead)에서 php를 실행하도록 설정합니다.

확인
PhpStorm에서 PHPUnit을 실행하고 다음과 같이 테스트가 실행되면 OK입니다.
Testing started at 10:16 ...
vagrant://C:/Users/。。。
/home/vagrant/。。。
PHPUnit 5.7.20 by Sebastian Bergmann and contributors.
Time: 868 ms, Memory: 10.00MB
OK (1 test, 1 assertion)
Process finished with exit code 0
                
                    
        
    
    
    
    
    
                
                
                
                
                    
                        
                            
                            
                            Reference
                            
                            이 문제에 관하여(Laravel + Homestead(Vagrant) + PhpStorm에서 PHPUnit 실행 시 "Cannot find PHPUnit in include path (.:/usr/share/php)"가 나오는 문제), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
                                
                                https://qiita.com/t-kuni/items/35b484feff0b059d043b
                            
                            
                            
                                텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
                            
                            
                                
                                
                                 우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)
                                
                                
                                우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)
                            
                            
                        
                    
                
                
                
            
Testing started at 10:16 ...
vagrant://C:/Users/。。。
/home/vagrant/。。。
PHPUnit 5.7.20 by Sebastian Bergmann and contributors.
Time: 868 ms, Memory: 10.00MB
OK (1 test, 1 assertion)
Process finished with exit code 0
Reference
이 문제에 관하여(Laravel + Homestead(Vagrant) + PhpStorm에서 PHPUnit 실행 시 "Cannot find PHPUnit in include path (.:/usr/share/php)"가 나오는 문제), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/t-kuni/items/35b484feff0b059d043b텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
                                
                                
                                
                                
                                
                                우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)