Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop PHPUnit tests capable of being run in situ #2

Closed
bobbingwide opened this issue Aug 20, 2016 · 1 comment
Closed

Develop PHPUnit tests capable of being run in situ #2

bobbingwide opened this issue Aug 20, 2016 · 1 comment
Assignees

Comments

@bobbingwide
Copy link
Owner

Using the functionality of oik-batch and wordpress-develop-tests, develop PHPUnit tests for the bbboing plugin that are capable of being run in situ.

Three files are required in the repo

  1. phpunit.xml.dist - contents as below (initially)
  2. phpunit.json - the most recently run test output
  3. tests/test-bbboing.php - the source for the tests
<phpunit
    bootstrap="../oik-batch/oik-wp.php"
    backupGlobals="false"
    colors="false"
    convertErrorsToExceptions="true"
    convertNoticesToExceptions="true"
    convertWarningsToExceptions="true"
    >
    <testsuites>
        <testsuite>
            <directory prefix="test-" suffix=".php">tests/</directory>
        </testsuite>
    </testsuites>
</phpunit>

The tests will be dependent upon https://github.com/bobbingwide/oik-batch and
https://github.com/bobbingwide/wordpress-develop-tests

I'm developing with PHP 7 and had some problems with PHPUnit v4.8.0
These have been fixed in PHPUnit v5.5.0 so I'm using that now.
So far I haven't had any insurmountable problems with v5.5.0
Time will tell.

@bobbingwide
Copy link
Owner Author

Now using 5.5.2. Still no problems attributable to PHPUnit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant