Skip to main content

Test PHP applications

This guide will help you to test PHP applications with FluentCI.

Before you begin

The instructions on this page assume that you are familiar with PHP. In addition:

  • Be familiar with creating PHP-based applications.
  • Have your PHP project ready.
  • Have your composer.json and phpunit.xml files ready.
  • Have your tests written in the tests directory.

Using the PHP Plugin

You can use FluentCI to test PHP applications using the php plugin, no need to install PHP on your machine, FluentCI will handle everything for you.

The following commands can be used to test PHP applications:

fluentci run --wasm php compose_install
fluentci run --wasm php test

CI/CD pipeline integrations

The following examples show how to integrate FluentCI with popular CI providers to test PHP applications:

ci.yml
name: ci
on:
push:
branches:
- main
jobs:
tasks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Fluent CI
uses: fluentci-io/setup-fluentci@v5
- name: composer install
run: fluentci run --wasm php composer_install
- name: test
run: fluentci run --wasm php test