0.2.0 • Published 12 months ago

@nx-php/phpunit v0.2.0

Weekly downloads
-
License
-
Repository
-
Last release
12 months ago

@nx-php/phpunit

The @nx-php/phpunit package is a plugin for an Nx Workspace that enables you to build PHP packages within a monorepo. With this package, you can easily integrate PHP packages into your existing Nx workspace.

Getting Started

To start using the @nx-php/phpunit, follow these steps:

  1. Install the plugin as a development dependency in your Nx workspace:
npm install --save-dev @nx-php/phpunit
  1. Add a test target for your project.

::: tip You likely need to build before you test. This example highlights using @nx-php/phpbuild. :::

{
    "name": "my-org/my-package",
    "$schema": "../../node_modules/nx/schemas/project-schema.json",
    "sourceRoot": "packages/my-package/src",
    "projectType": "library",
    "targets": {
        "build": {
            "executor": "@nx-php/phpbuild:phpbuild",
            "dependsOn": [
                "^build"
            ],
        },
        "test": {
            "executor": "@nx-php/phpunit:phpunit",
            "dependsOn": [
                "build"
            ]
        },
    },
    "tags": []
}
  1. Run your tests!

::: tip If you've done this correctly, you'll see a build (or many builds) before your test runs! :::

npx nx run your-project:test
0.2.0

12 months ago

0.1.2

1 year ago