shadiakiki1986/phpunit-ffa-assertions

There is no license information available for the latest version (0.2.0) of this package.

ffa assertions for PHPUnit

0.2.0 2019-04-10 12:22 UTC

This package is not auto-updated.

Last update: 2024-11-06 11:59:43 UTC


README

Shamelessly copied from phpunit/phpunit-dom-assertions

PHPUnit assertions I use in FFA:

  • assertQueriesValid()
  • assertFileEqualsWrap() (the original assertFileEquals hangs for large files)

Published on packagist

Build Status

Installation

The recommended way to install the PHPUnit FFA assertions is through composer using composer require --dev shadiakiki1986/phpunit-ffa-assertions

(Note the --dev is for adding the package to the require-dev part in the composer.json file)

Usage

Extend \FfaPhp\FfaTestCase to use the FFA assertions:

class FfaTest1 extends \FfaPhp\FfaTestCase
{
    public function testQueriesValid()
    {
        $this->assertQueriesValid('select a from b');
        $this->assertQueriesValid('select a from b','prefix message if fail');
    }

    public function testFileEqualsWrap()
    {
        $this->assertFileEqualsWrap('path/to/file','some content');
    }

}

Tests

Build Status

To run the test suite, you need composer.

$ php composer.phar install
$ vendor/bin/phpunit