사용자 도구

사이트 도구


wordpress:unit_testing

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

다음 판
이전 판
다음 판양쪽 다음 판
wordpress:unit_testing [2016/01/26 16:39] – 만듦 changwoowordpress:unit_testing [2016/01/27 16:06] – subversion 설치 언급. changwoo
줄 6: 줄 6:
 참고로 아래 코드는 [[ https://github.com/chwnam/vagrantwrapper| vagrantwrapper]] provision 스크립트에 포함되었다. 참고로 아래 코드는 [[ https://github.com/chwnam/vagrantwrapper| vagrantwrapper]] provision 스크립트에 포함되었다.
  
-참고로 아래 WP-CLI에서 요구하는 PHPUnit은 4.8.X 버전을 요구하므로 패키지 매니저를 통해 PHPUnit을 설치하는 것은 이 문서를 작성하는 2016년 1월 현재에는 적당하지 않다. 아래 스크립트처럼 직접 PHPUnit 을 받는 것이 적절하다.+참고로 아래 WP-CLI에서 요구하는 PHPUnit은 4.8.X 버전을 요구하므로(출처?패키지 매니저를 통해 PHPUnit을 설치하는 것은 이 문서를 작성하는 2016년 1월 현재에는 적당하지 않다. 아래 스크립트처럼 직접 PHPUnit 을 받는 것이 적절하다.
  
 <code bash> <code bash>
줄 56: 줄 56:
 /** Sets up WordPress vars and included files. */ /** Sets up WordPress vars and included files. */
 require_once(ABSPATH . 'wp-settings.php'); require_once(ABSPATH . 'wp-settings.php');
 +</code>
 +
 +==== 기타 ====
 +나중에 실행될 ''install-wp-tests.sh''는 SVN을 요구한다.
 +<code bash>
 +sudo apt-get install subversion
 </code> </code>
  
줄 68: 줄 74:
 플러그인 디렉토리에 가 보면 다음과 같은 디렉토리가 부가적으로 생성된 것을 확인할 수 있다. 플러그인 디렉토리에 가 보면 다음과 같은 디렉토리가 부가적으로 생성된 것을 확인할 수 있다.
  
-* bin/ +  * bin/ 
-  * install-wp-test.sh +    * install-wp-test.sh 
-* tests/ +  * tests/ 
-  * bootstrap.php +    * bootstrap.php 
-  * test-sample.php +    * test-sample.php 
-* phpunit.xml +  * phpunit.xml 
-* .travis.yml+  * .travis.yml 
 + 
 +테스트 환경을 만드는 쉘 스크립트가 ''bin/install-wp-test.sh''로 만들어진 것을 확인할 수 있다. 이 스크립트는 워드프레스 개발 버전 관리 시스템 서버, SVN에서 
  
 테스트는 다음 명령으로 실행 가능하다. 테스트는 다음 명령으로 실행 가능하다.
줄 82: 줄 90:
  
 ===== 참고 자료 ===== ===== 참고 자료 =====
-* [[https://pippinsplugins.com/unit-tests-wordpress-plugins-introduction/ | Unit Tests for WordPress Plugins - An Introduction]] +  * [[https://pippinsplugins.com/unit-tests-wordpress-plugins-introduction/ | Unit Tests for WordPress Plugins - An Introduction]] 
-* http://wp-cli.org/ +  * http://wp-cli.org/ 
-  * http://wp-cli.org/blog/plugin-unit-tests.html+    * http://wp-cli.org/blog/plugin-unit-tests.html
wordpress/unit_testing.txt · 마지막으로 수정됨: 2016/01/28 14:37 저자 changwoo

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki