From 4ffe8c5dd61136ea70ea525e4ec73cfb2cd921ea Mon Sep 17 00:00:00 2001 From: Nicolas Lamirault Date: Mon, 8 Aug 2016 10:05:22 +0200 Subject: [PATCH 01/10] bump version Signed-off-by: Nicolas Lamirault --- phpunit.el | 2 +- test/phpunit-version-test.el | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/phpunit.el b/phpunit.el index 3bc194d..2b8c45b 100644 --- a/phpunit.el +++ b/phpunit.el @@ -4,7 +4,7 @@ ;; Eric Hansen ;; ;; URL: https://github.com/nlamirault/phpunit.el -;; Version: 0.11.0 +;; Version: 0.12.0 ;; Keywords: php, tests, phpunit ;; Package-Requires: ((s "1.9.0") (f "0.16.0") (pkg-info "0.5") (cl-lib "0.5") (emacs "24.3")) diff --git a/test/phpunit-version-test.el b/test/phpunit-version-test.el index 43ebbe6..82a5169 100644 --- a/test/phpunit-version-test.el +++ b/test/phpunit-version-test.el @@ -1,6 +1,6 @@ ;;; phpunit-version-test.el --- Tests for version information -;; Copyright (C) 2014, 2015, 2016 Nicolas Lamirault +;; Copyright (C) 2014-2016 Nicolas Lamirault ;;; Commentary: @@ -37,7 +37,7 @@ ;;(message "PHPUnit.el : %s" lib-version) (message "PHPUnit.el Cask version: %s" cask-version) ;;(should (string= version (phpunit-mode-library-version))))) - (should (string= "0.11.0" cask-version)))) + (should (string= "0.12.0" cask-version)))) From 109145660dd77d86ee37d6635641f7d324388a78 Mon Sep 17 00:00:00 2001 From: Nicolas Lamirault Date: Mon, 8 Aug 2016 10:08:45 +0200 Subject: [PATCH 02/10] Update copyright Signed-off-by: Nicolas Lamirault --- Cask | 15 +++++++++++++++ Makefile | 2 +- phpunit-mode.el | 2 ++ phpunit.el | 2 +- test/phpunit-test.el | 2 +- test/test-helper.el | 2 +- 6 files changed, 21 insertions(+), 4 deletions(-) diff --git a/Cask b/Cask index 75d0c50..dc50fa0 100644 --- a/Cask +++ b/Cask @@ -1,3 +1,18 @@ +;;; Copyright (C) 2014-2016 Nicolas Lamirault + +;;; This program is free software: you can redistribute it and/or modify +;;; it under the terms of the GNU General Public License as published by +;;; the Free Software Foundation, either version 3 of the License, or +;;; (at your option) any later version. + +;;; This program is distributed in the hope that it will be useful, +;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. + +;;; You should have received a copy of the GNU General Public License +;;; along with this program. If not, see . + ;;; Scame Cask file (source "melpa" "http://stable.melpa.org/packages/") diff --git a/Makefile b/Makefile index ea8e04a..8df8aa4 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -# Copyright (C) 2014, 2015 Nicolas Lamirault +# Copyright (C) 2014-2016 Nicolas Lamirault # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/phpunit-mode.el b/phpunit-mode.el index 42e9a17..49ea502 100644 --- a/phpunit-mode.el +++ b/phpunit-mode.el @@ -1,5 +1,7 @@ ;;; phpunit-mode.el --- Minor mode for PHPUnit +;; Copyright (C) 2014-2016 Nicolas Lamirault + ;; This program is free software; you can redistribute it and/or ;; modify it under the terms of the GNU General Public License ;; as published by the Free Software Foundation; either version 2 diff --git a/phpunit.el b/phpunit.el index 2b8c45b..1d016c3 100644 --- a/phpunit.el +++ b/phpunit.el @@ -11,7 +11,7 @@ ;;; License: -;; Copyright (C) 2014, 2015, 2016 Nicolas Lamirault +;; Copyright (C) 2014-2016 Nicolas Lamirault ;; This program is free software; you can redistribute it and/or ;; modify it under the terms of the GNU General Public License diff --git a/test/phpunit-test.el b/test/phpunit-test.el index 998b9a5..fc4b3cc 100644 --- a/test/phpunit-test.el +++ b/test/phpunit-test.el @@ -1,6 +1,6 @@ ;;; phpunit-test.el --- Tests for phpunit.el -;; Copyright (C) 2014, 2015, 2016 Nicolas Lamirault +;; Copyright (C) 2014-2016 Nicolas Lamirault ;;; Commentary: diff --git a/test/test-helper.el b/test/test-helper.el index 2d7674d..00354d8 100644 --- a/test/test-helper.el +++ b/test/test-helper.el @@ -1,6 +1,6 @@ ;; test-helper.el --- Test helpers for Phpunit.el -;; Copyright (C) 2014, 2015, 2016 Nicolas Lamirault +;; Copyright (C) 2014-2016 Nicolas Lamirault ;; Author: Nicolas Lamirault ;; Homepage: https://github.com/nlamirault/phpunit.el From 9dc5241f7f48a16cc38117136eacee8db1edbc58 Mon Sep 17 00:00:00 2001 From: Nicolas Lamirault Date: Mon, 8 Aug 2016 10:28:40 +0200 Subject: [PATCH 03/10] Update Coveralls badges Signed-off-by: Nicolas Lamirault --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index eaccc6e..160addc 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,17 @@ # phpunit.el [![License GPL 3][badge-license]][LICENSE] -[![Coverage Status](https://coveralls.io/repos/nlamirault/phpunit.el/badge.png)](https://coveralls.io/r/nlamirault/phpunit.el) + Master : * [![MELPA Stable](https://stable.melpa.org/packages/phpunit-badge.svg)](https://stable.melpa.org/#/phpunit) * [![Circle CI](https://circleci.com/gh/nlamirault/phpunit.el/tree/master.svg?style=svg)](https://circleci.com/gh/nlamirault/phpunit.el/tree/master) +* [![Coverage Status](https://coveralls.io/repos/nlamirault/phpunit.el/badge.png)](https://coveralls.io/r/nlamirault/phpunit.el) Develop : * [![Melpa Status](https://melpa.org/packages/phpunit-badge.svg)](https://melpa.org/#/phpunit) * [![Circle CI](https://circleci.com/gh/nlamirault/phpunit.el/tree/develop.svg?style=svg)](https://circleci.com/gh/nlamirault/phpunit.el/tree/develop) +* [![Coverage Status](https://coveralls.io/repos/github/nlamirault/phpunit.el/badge.svg?branch=develop)](https://coveralls.io/github/nlamirault/phpunit.el?branch=develop) Manage the [PHPUnit][] tests from Emacs (>= 24.3) From 663a04015534e27ff360863bd45e8e3e6d55af95 Mon Sep 17 00:00:00 2001 From: Nicolas Lamirault Date: Mon, 8 Aug 2016 10:29:17 +0200 Subject: [PATCH 04/10] Update Coveralls badges Signed-off-by: Nicolas Lamirault --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 160addc..b190f43 100644 --- a/README.md +++ b/README.md @@ -9,9 +9,7 @@ Master : * [![Coverage Status](https://coveralls.io/repos/nlamirault/phpunit.el/badge.png)](https://coveralls.io/r/nlamirault/phpunit.el) Develop : -* [![Melpa Status](https://melpa.org/packages/phpunit-badge.svg)](https://melpa.org/#/phpunit) -* [![Circle CI](https://circleci.com/gh/nlamirault/phpunit.el/tree/develop.svg?style=svg)](https://circleci.com/gh/nlamirault/phpunit.el/tree/develop) -* [![Coverage Status](https://coveralls.io/repos/github/nlamirault/phpunit.el/badge.svg?branch=develop)](https://coveralls.io/github/nlamirault/phpunit.el?branch=develop) +[![Melpa Status](https://melpa.org/packages/phpunit-badge.svg)](https://melpa.org/#/phpunit) [![Circle CI](https://circleci.com/gh/nlamirault/phpunit.el/tree/develop.svg?style=svg)](https://circleci.com/gh/nlamirault/phpunit.el/tree/develop) [![Coverage Status](https://coveralls.io/repos/github/nlamirault/phpunit.el/badge.svg?branch=develop)](https://coveralls.io/github/nlamirault/phpunit.el?branch=develop) Manage the [PHPUnit][] tests from Emacs (>= 24.3) From 0b5f9ceaa17a7e7ed84f35451e3dcab3d4e84f5f Mon Sep 17 00:00:00 2001 From: Nicolas Lamirault Date: Mon, 8 Aug 2016 10:29:46 +0200 Subject: [PATCH 05/10] Update Coveralls badges Signed-off-by: Nicolas Lamirault --- README.md | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index b190f43..e2c007f 100644 --- a/README.md +++ b/README.md @@ -2,14 +2,8 @@ [![License GPL 3][badge-license]][LICENSE] - -Master : -* [![MELPA Stable](https://stable.melpa.org/packages/phpunit-badge.svg)](https://stable.melpa.org/#/phpunit) -* [![Circle CI](https://circleci.com/gh/nlamirault/phpunit.el/tree/master.svg?style=svg)](https://circleci.com/gh/nlamirault/phpunit.el/tree/master) -* [![Coverage Status](https://coveralls.io/repos/nlamirault/phpunit.el/badge.png)](https://coveralls.io/r/nlamirault/phpunit.el) - -Develop : -[![Melpa Status](https://melpa.org/packages/phpunit-badge.svg)](https://melpa.org/#/phpunit) [![Circle CI](https://circleci.com/gh/nlamirault/phpunit.el/tree/develop.svg?style=svg)](https://circleci.com/gh/nlamirault/phpunit.el/tree/develop) [![Coverage Status](https://coveralls.io/repos/github/nlamirault/phpunit.el/badge.svg?branch=develop)](https://coveralls.io/github/nlamirault/phpunit.el?branch=develop) +* Master [![MELPA Stable](https://stable.melpa.org/packages/phpunit-badge.svg)](https://stable.melpa.org/#/phpunit) [![Circle CI](https://circleci.com/gh/nlamirault/phpunit.el/tree/master.svg?style=svg)](https://circleci.com/gh/nlamirault/phpunit.el/tree/master) [![Coverage Status](https://coveralls.io/repos/nlamirault/phpunit.el/badge.png)](https://coveralls.io/r/nlamirault/phpunit.el) +* Develop : [![Melpa Status](https://melpa.org/packages/phpunit-badge.svg)](https://melpa.org/#/phpunit) [![Circle CI](https://circleci.com/gh/nlamirault/phpunit.el/tree/develop.svg?style=svg)](https://circleci.com/gh/nlamirault/phpunit.el/tree/develop) [![Coverage Status](https://coveralls.io/repos/github/nlamirault/phpunit.el/badge.svg?branch=develop)](https://coveralls.io/github/nlamirault/phpunit.el?branch=develop) Manage the [PHPUnit][] tests from Emacs (>= 24.3) From a004df0a83e7013f938059db6e231f2c6a8d5261 Mon Sep 17 00:00:00 2001 From: Nicolas Lamirault Date: Mon, 8 Aug 2016 10:35:00 +0200 Subject: [PATCH 06/10] Update changelog with links Signed-off-by: Nicolas Lamirault --- ChangeLog.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index 30d012d..0357434 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -2,48 +2,48 @@ ## Version 0.11.0 (08/08/2016) -- #PR25: Add phpunit-group (Thanks zonuexe) +- [#PR25](https://github.com/nlamirault/phpunit.el/pull/25): Add phpunit-group (Thanks zonuexe) ## Version 0.10.0 (08/07/2016) -- #PR23: Better regexp using rx (Thanks zonuexe) -- #PR22: Simplify phpunit-current-class (Thanks zonuexe) -- #PR21: Fix for Emacs 25.1 (Thanks zonuexe) +- [#PR23](https://github.com/nlamirault/phpunit.el/pull/23): Better regexp using rx (Thanks zonuexe) +- [#PR22](https://github.com/nlamirault/phpunit.el/pull/22): Simplify phpunit-current-class (Thanks zonuexe) +- [#PR21](https://github.com/nlamirault/phpunit.el/pull/21): Fix for Emacs 25.1 (Thanks zonuexe) ## Version 0.9.0 (05/31/2016) -- #PR19: Some problem fixes (Tramp, phpunit-get-root-directory, +- [#PR19](https://github.com/nlamirault/phpunit.el/pull/19): Some problem fixes (Tramp, phpunit-get-root-directory, Use phpunit -c option when set configuration file, ...) (thanks zonuexe) - Remove keybinding from phpunit-helm ## Version 0.8.0 (05/12/2016) -- #PR16: Create a minor mode (thanks eric-hansen) -- #PR12: Using the phpunit installed by Composer (thanks wangchen) +- [#PR16](https://github.com/nlamirault/phpunit.el/pull/16): Create a minor mode (thanks eric-hansen) +- [#PR12](https://github.com/nlamirault/phpunit.el/pull/12): Using the phpunit installed by Composer (thanks wangchen) ## Version 0.7.0 (09/10/2015) -- #PR10: Set stty columns before running the phpunit command (Thanks Ryckes) +- [#PR10](https://github.com/nlamirault/phpunit.el/pull/10): Set stty columns before running the phpunit command (Thanks Ryckes) ## Version 0.6.0 (08/27/2015) -- #PR9: Exact Class Names and Naming Conventions (Thanks muddletoes) +- [#PR9](https://github.com/nlamirault/phpunit.el/pull/9): Exact Class Names and Naming Conventions (Thanks muddletoes) ## Version 0.5.0 (08/23/2015) -- #PR7 : `php-get-current-class` matches style convention (Thanks muddletoes) -- #PR5 : Add error navigation after a failed test (Thanks Ryckes) +- [#PR7](https://github.com/nlamirault/phpunit.el/pull/7) : `php-get-current-class` matches style convention (Thanks muddletoes) +- [#PR5](https://github.com/nlamirault/phpunit.el/pull/5) : Add error navigation after a failed test (Thanks Ryckes) ## Version 0.4.0 (03/02/2015) - Update unit tests configuration for [overseer][] -- #PR4: Variables for phpunit's directory and filename (Ahmad N. Raja) +- [#PR4](https://github.com/nlamirault/phpunit.el/pull/4): Variables for phpunit's directory and filename (Ahmad N. Raja) - Update [TravisCI][] and [Drone.io][] for continuous integration - Add code coverage using [undercover][] ## Version 0.3.0 (10/24/2014) -- #PR2: Remove unnecessary "depends-on" from Cask +- [#PR2](https://github.com/nlamirault/phpunit.el/pull/2): Remove unnecessary "depends-on" from Cask - `FIX` Add Package-Requires line to display dependencies - Update documentation From c2ddc76ceec4a9565b9450f132dd0013c0742563 Mon Sep 17 00:00:00 2001 From: Nicolas Lamirault Date: Mon, 8 Aug 2016 10:35:34 +0200 Subject: [PATCH 07/10] Rename Pull Requests links Signed-off-by: Nicolas Lamirault --- ChangeLog.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index 0357434..5b9b54a 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -2,48 +2,48 @@ ## Version 0.11.0 (08/08/2016) -- [#PR25](https://github.com/nlamirault/phpunit.el/pull/25): Add phpunit-group (Thanks zonuexe) +- [#25](https://github.com/nlamirault/phpunit.el/pull/25): Add phpunit-group (Thanks zonuexe) ## Version 0.10.0 (08/07/2016) -- [#PR23](https://github.com/nlamirault/phpunit.el/pull/23): Better regexp using rx (Thanks zonuexe) -- [#PR22](https://github.com/nlamirault/phpunit.el/pull/22): Simplify phpunit-current-class (Thanks zonuexe) -- [#PR21](https://github.com/nlamirault/phpunit.el/pull/21): Fix for Emacs 25.1 (Thanks zonuexe) +- [#23](https://github.com/nlamirault/phpunit.el/pull/23): Better regexp using rx (Thanks zonuexe) +- [#22](https://github.com/nlamirault/phpunit.el/pull/22): Simplify phpunit-current-class (Thanks zonuexe) +- [#21](https://github.com/nlamirault/phpunit.el/pull/21): Fix for Emacs 25.1 (Thanks zonuexe) ## Version 0.9.0 (05/31/2016) -- [#PR19](https://github.com/nlamirault/phpunit.el/pull/19): Some problem fixes (Tramp, phpunit-get-root-directory, +- [#19](https://github.com/nlamirault/phpunit.el/pull/19): Some problem fixes (Tramp, phpunit-get-root-directory, Use phpunit -c option when set configuration file, ...) (thanks zonuexe) - Remove keybinding from phpunit-helm ## Version 0.8.0 (05/12/2016) -- [#PR16](https://github.com/nlamirault/phpunit.el/pull/16): Create a minor mode (thanks eric-hansen) -- [#PR12](https://github.com/nlamirault/phpunit.el/pull/12): Using the phpunit installed by Composer (thanks wangchen) +- [#16](https://github.com/nlamirault/phpunit.el/pull/16): Create a minor mode (thanks eric-hansen) +- [#12](https://github.com/nlamirault/phpunit.el/pull/12): Using the phpunit installed by Composer (thanks wangchen) ## Version 0.7.0 (09/10/2015) -- [#PR10](https://github.com/nlamirault/phpunit.el/pull/10): Set stty columns before running the phpunit command (Thanks Ryckes) +- [#10](https://github.com/nlamirault/phpunit.el/pull/10): Set stty columns before running the phpunit command (Thanks Ryckes) ## Version 0.6.0 (08/27/2015) -- [#PR9](https://github.com/nlamirault/phpunit.el/pull/9): Exact Class Names and Naming Conventions (Thanks muddletoes) +- [#9](https://github.com/nlamirault/phpunit.el/pull/9): Exact Class Names and Naming Conventions (Thanks muddletoes) ## Version 0.5.0 (08/23/2015) -- [#PR7](https://github.com/nlamirault/phpunit.el/pull/7) : `php-get-current-class` matches style convention (Thanks muddletoes) -- [#PR5](https://github.com/nlamirault/phpunit.el/pull/5) : Add error navigation after a failed test (Thanks Ryckes) +- [#7](https://github.com/nlamirault/phpunit.el/pull/7) : `php-get-current-class` matches style convention (Thanks muddletoes) +- [#5](https://github.com/nlamirault/phpunit.el/pull/5) : Add error navigation after a failed test (Thanks Ryckes) ## Version 0.4.0 (03/02/2015) - Update unit tests configuration for [overseer][] -- [#PR4](https://github.com/nlamirault/phpunit.el/pull/4): Variables for phpunit's directory and filename (Ahmad N. Raja) +- [#4](https://github.com/nlamirault/phpunit.el/pull/4): Variables for phpunit's directory and filename (Ahmad N. Raja) - Update [TravisCI][] and [Drone.io][] for continuous integration - Add code coverage using [undercover][] ## Version 0.3.0 (10/24/2014) -- [#PR2](https://github.com/nlamirault/phpunit.el/pull/2): Remove unnecessary "depends-on" from Cask +- [#2](https://github.com/nlamirault/phpunit.el/pull/2): Remove unnecessary "depends-on" from Cask - `FIX` Add Package-Requires line to display dependencies - Update documentation From 383ac281c8996270e5ccf1fdcf056229fd48fcff Mon Sep 17 00:00:00 2001 From: Nicolas Lamirault Date: Mon, 8 Aug 2016 10:51:02 +0200 Subject: [PATCH 08/10] FIX unit tests launcher Signed-off-by: Nicolas Lamirault --- test/phpunit-test.el | 21 ++++++++++++--------- test/test-helper.el | 2 +- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/test/phpunit-test.el b/test/phpunit-test.el index fc4b3cc..172d1d3 100644 --- a/test/phpunit-test.el +++ b/test/phpunit-test.el @@ -41,19 +41,22 @@ (ert-deftest test-phpunit-get-class-from-file-path() - :tags '(tools) - (should (string= "PhpUnitTest" - (phpunit-get-current-class "/tmp/foo/PhpUnit.class.under.test.php")))) + :tags '(tools current) + (with-test-sandbox + (should (string= "PhpUnitTest" + (phpunit-get-current-class "/tmp/foo/PhpUnit.class.under.test.php"))))) (ert-deftest test-phpunit-get-class-from-source-class() - :tags '(tools) - (should (string= "PhpUnitTest" - (phpunit-get-current-class "PhpUnit")))) + :tags '(tools) + (with-test-sandbox + (should (string= "PhpUnitTest" + (phpunit-get-current-class "PhpUnit"))))) (ert-deftest test-phpunit-get-class-from-unit-test-class() - :tags '(tools) - (should (string= "PhpUnitTest" - (phpunit-get-current-class "PhpUnitTest")))) + :tags '(tools) + (with-test-sandbox + (should (string= "PhpUnitTest" + (phpunit-get-current-class "PhpUnitTest"))))) ;; Using configuration file diff --git a/test/test-helper.el b/test/test-helper.el index 00354d8..e12221a 100644 --- a/test/test-helper.el +++ b/test/test-helper.el @@ -73,7 +73,7 @@ (defun load-library (file) "Load current library from FILE." (let ((path (s-concat phpunit-source-dir file))) - (message (ansi-yellow "[gotest] Load library from %s" path)) + (message (ansi-yellow "[phpunit] Load library from %s" path)) (undercover "*.el" (:exclude "*-test.el")) (require 'phpunit path))) From 3fe4de1cf988166bbfa81478d7ccc7dd83b0fa8e Mon Sep 17 00:00:00 2001 From: Nicolas Lamirault Date: Mon, 8 Aug 2016 11:02:39 +0200 Subject: [PATCH 09/10] FIX unit tests if *phpunit* executable exists. If a phpunit executable file is in the PATH, unit tests failed. See: https://circleci.com/gh/nlamirault/phpunit.el/72 Signed-off-by: Nicolas Lamirault --- test/phpunit-test.el | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/test/phpunit-test.el b/test/phpunit-test.el index 172d1d3..d790ff5 100644 --- a/test/phpunit-test.el +++ b/test/phpunit-test.el @@ -30,18 +30,18 @@ ;; (require 'phpunit) -(defun phpunit-command (&rest arg) - (let ((composer-dir (s-concat (concat (getenv "HOME") "/") ".composer")) - (conf (if phpunit-configuration-file - (s-concat "-c " phpunit-configuration-file " ") - ""))) - (if (f-dir? composer-dir) - (apply 's-concat composer-dir "/vendor/bin/phpunit " conf arg) - (apply 's-concat "./vendor/bin/phpunit " conf arg)))) +;; (defun phpunit-command (&rest arg) +;; (let ((composer-dir (s-concat (concat (getenv "HOME") "/") ".composer")) +;; (conf (if phpunit-configuration-file +;; (s-concat "-c " phpunit-configuration-file " ") +;; ""))) +;; (if (f-dir? composer-dir) +;; (apply 's-concat composer-dir "/vendor/bin/phpunit " conf arg) +;; (apply 's-concat "./vendor/bin/phpunit " conf arg)))) (ert-deftest test-phpunit-get-class-from-file-path() - :tags '(tools current) + :tags '(tools) (with-test-sandbox (should (string= "PhpUnitTest" (phpunit-get-current-class "/tmp/foo/PhpUnit.class.under.test.php"))))) @@ -79,36 +79,37 @@ (ert-deftest test-phpunit-get-program-without-args () :tags '(arguments) (with-test-sandbox - (should (string= (phpunit-command) - (phpunit-get-program (phpunit-arguments "")))))) + (should (s-suffix? "phpunit " + (phpunit-get-program (phpunit-arguments "")))))) (ert-deftest test-phpunit-add-stop-on-error-argument () - :tags '(arguments) + :tags '(arguments current) (with-test-sandbox (let ((phpunit-stop-on-error t)) - (should (s-suffix? (phpunit-command " --stop-on-error") - (phpunit-get-program (phpunit-arguments ""))))))) + (message "==> %s " (phpunit-get-program (phpunit-arguments ""))) + (should (s-suffix? "phpunit --stop-on-error" + (phpunit-get-program (phpunit-arguments ""))))))) (ert-deftest test-phpunit-add-stop-on-failure-argument () :tags '(arguments) (with-test-sandbox (let ((phpunit-stop-on-failure t)) - (should (s-suffix? (phpunit-command " --stop-on-failure") - (phpunit-get-program (phpunit-arguments ""))))))) + (should (s-suffix? "phpunit --stop-on-failure" + (phpunit-get-program (phpunit-arguments ""))))))) (ert-deftest test-phpunit-add-stop-on-skipped-argument () :tags '(arguments) (with-test-sandbox (let ((phpunit-stop-on-skipped t)) - (should (s-suffix? (phpunit-command " --stop-on-skipped") - (phpunit-get-program (phpunit-arguments ""))))))) + (should (s-suffix? "phpunit --stop-on-skipped" + (phpunit-get-program (phpunit-arguments ""))))))) (ert-deftest test-phpunit-add-verbose-argument () :tags '(arguments) (with-test-sandbox (let ((phpunit-verbose-mode t)) - (should (s-suffix? (phpunit-command " --verbose") - (phpunit-get-program (phpunit-arguments ""))))))) + (should (s-suffix? "phpunit --verbose" + (phpunit-get-program (phpunit-arguments ""))))))) (provide 'phpunit-test) From 3ce694ae83ae1c553c69ded3c1bdde560ddd677a Mon Sep 17 00:00:00 2001 From: Nicolas Lamirault Date: Mon, 8 Aug 2016 11:12:09 +0200 Subject: [PATCH 10/10] update doc Signed-off-by: Nicolas Lamirault --- ChangeLog.md | 7 +++++++ README.md | 30 +++++++++++++++++++++++++----- 2 files changed, 32 insertions(+), 5 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index 5b9b54a..4312766 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,5 +1,12 @@ # phpunit.el ChangeLog +## Version 0.12.0 (08/08/2016) + +- `FIX` unit tests if *phpunit* executable exists. +- `FIX` Unit tests launcher using *overseer* +- Update documentation for unit testing +- Setup code coverage badges for *master* and *develop* branches + ## Version 0.11.0 (08/08/2016) - [#25](https://github.com/nlamirault/phpunit.el/pull/25): Add phpunit-group (Thanks zonuexe) diff --git a/README.md b/README.md index e2c007f..ce30adf 100644 --- a/README.md +++ b/README.md @@ -64,12 +64,30 @@ management. Install it and retrieve dependencies : $ export PATH="$HOME/.cask/bin:$PATH" $ cask +### Testing -### Tests +* Launch unit tests from shell -Launch unit tests : + $ make clean test - $ make clean test +* Using [overseer][] : + +Keybinding | Description +---------------------|------------------------------------------------------------ +C-c , t | launch unit tests from buffer +C-c , b | launch unit tests +C-c , g | launch unit tests with tag (find, regexp, ...) + +* Tips: + +If you want to launch a single unit test, add a specify tag : + +```lisp +(ert-deftest test-foobar () + :tags '(current) + ``` + +And launch it using : C-c , g and specify tag : *current* ## Support / Contribute @@ -95,9 +113,11 @@ Nicolas Lamirault [badge-license]: https://img.shields.io/badge/license-GPL_2-green.svg?style=flat [LICENSE]: https://github.com/nlamirault/phpunit.el/blob/master/LICENSE +[Issue tracker]: https://github.com/nlamirault/phpunit.el/issues + +[PHPUnit]: http://phpunit.de [GNU Emacs]: https://www.gnu.org/software/emacs/ [MELPA]: https://melpa.org/ [Cask]: http://cask.github.io/ -[Issue tracker]: https://github.com/nlamirault/phpunit.el/issues -[PHPUnit]: http://phpunit.de +[Overseer]: https://github.com/tonini/overseer.el