diff mbox series

[bug#67902,95/95] gnu: Add php-phpunit-phpunit.

Message ID 20231219140934.22783-95-ngraves@ngraves.fr
State New
Headers show
Series PHP package chain. | expand

Commit Message

Nicolas Graves Dec. 19, 2023, 1:58 p.m. UTC
* gnu/packages/php-xyz.scm (php-phpunit-phpunit): New variable.

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

Patch

diff --git a/gnu/packages/php-xyz.scm b/gnu/packages/php-xyz.scm
index 9bd64cdf40..6b5b780af5 100644
--- a/gnu/packages/php-xyz.scm
+++ b/gnu/packages/php-xyz.scm
@@ -2586,3 +2586,57 @@  (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/")
+    (license license:bsd-3)))