diff mbox series

[bug#67902,v4,96/98] gnu: Add php-phpunit-phpunit.

Message ID 20241007214530.4420-96-ngraves@ngraves.fr
State New
Headers show
Series [bug#67902,v4,01/98] gnu: Add abnfgen. | expand

Commit Message

Nicolas Graves Oct. 7, 2024, 9:45 p.m. UTC
* gnu/packages/php-xyz.scm (php-phpunit-phpunit): New variable.

Change-Id: Ibc96cc5f2a0e06025beb8e16cc19012e99cf2908
---
 gnu/packages/php-xyz.scm | 55 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/php-xyz.scm b/gnu/packages/php-xyz.scm
index 9defe78f7a..0b7d97000f 100644
--- a/gnu/packages/php-xyz.scm
+++ b/gnu/packages/php-xyz.scm
@@ -2578,3 +2578,58 @@  (define-public php-webmozart-assert
     (home-page "https://github.com/webmozarts/assert")
     (license license:expat)))
 
+(define-public php-phpunit-phpunit
+  (package
+    (name "phpunit")
+    (version "9.6.10")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/sebastianbergmann/phpunit")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "15hpl8nr9vw1j7z7qp8l451vb6yz3pcshidhy7ca2dq1i7smhgr3"))))
+    (build-system composer-build-system)
+    (arguments
+     ;; Requires phpspec/prophecy-phpunit, which in turns requires phpunit.
+     `(#:tests? #f))
+    (inputs
+     (letrec* ((package-list
+                (list php-sebastian-version
+                      php-sebastian-type
+                      php-sebastian-cli-parser
+                      php-sebastian-recursion-context
+                      php-sebastian-resource-operations
+                      php-sebastian-object-enumerator
+                      php-sebastian-global-state
+                      php-sebastian-exporter
+                      php-sebastian-environment
+                      php-sebastian-diff
+                      php-sebastian-comparator
+                      php-sebastian-code-unit
+                      php-phpunit-php-timer
+                      php-phpunit-php-text-template
+                      php-phpunit-php-invoker
+                      php-phpunit-php-file-iterator
+                      php-phpunit-php-code-coverage
+                      php-phpspec-prophecy
+                      php-phar-io-version
+                      php-phar-io-manifest
+                      php-myclabs-deep-copy
+                      php-doctrine-instantiator))
+               (rewrite
+                (lambda (p)
+                  (package
+                    (inherit p)
+                    (arguments '(#:tests? #f))
+                    (native-inputs '())
+                    (inputs (map (compose rewrite cadr) (package-inputs p)))))))
+       (map rewrite package-list)))
+    (synopsis "PHP Unit Testing framework")
+    (description "PHPUnit is a testing framework for PHP.  It is an instance of
+the xUnit architecture for unit testing frameworks.")
+    (home-page "https://phpunit.de/")
+    (properties '((upstream-name . "phpunit/phpunit")))
+    (license license:bsd-3)))