Skip to content

PHPUnit Requirement bump needed #2

@bahiirwa

Description

@bahiirwa

Thank you for making this. I having an issue running the command.

composer create-project johnpbloch/wp-unit-test-project

Error message is:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for 10up/wp_mock dev-master -> satisfiable by 10up/wp_mock[dev-master].
    - 10up/wp_mock dev-master requires phpunit/phpunit >=7.0 -> satisfiable by phpunit/phpunit[7.0.0, 7.0.1, 7.0.2, 7.0.3, 7.1.0, 7.1.1, 7.1.2, 7.1.3, 7.1.4, 7.1.5, 7.2.0, 7.2.1, 7.2.2, 7.2.3, 7.2.4, 7.2.5, 7.2.6, 7.2.7, 7.3.0, 7.3.1, 7.3.2, 7.3.3, 7.3.4, 7.3.5, 7.4.0, 7.4.1, 7.4.2, 7.4.3, 7.4.4, 7.4.5, 7.5.0, 7.5.1, 7.5.10, 7.5.11, 7.5.12, 7.5.13, 7.5.14, 7.5.15, 7.5.16, 7.5.17, 7.5.18, 7.5.19, 7.5.2, 7.5.20, 7.5.3, 7.5.4, 7.5.5, 7.5.6, 7.5.7, 7.5.8, 7.5.9, 8.0.0, 8.0.1, 8.0.2, 8.0.3, 8.0.4, 8.0.5, 8.0.6, 8.1.0, 8.1.1, 8.1.2, 8.1.3, 8.1.4, 8.1.5, 8.1.6, 8.2.0, 8.2.1, 8.2.2, 8.2.3, 8.2.4, 8.2.5, 8.3.0, 8.3.1, 8.3.2, 8.3.3, 8.3.4, 8.3.5, 8.4.0, 8.4.1, 8.4.2, 8.4.3, 8.5.0, 8.5.1, 8.5.2, 8.5.3, 8.5.4, 8.5.5, 8.5.6, 8.5.7, 8.5.8, 8.5.x-dev, 9.0.0, 9.0.1, 9.0.2, 9.1.0, 9.1.1, 9.1.2, 9.1.3, 9.1.4, 9.1.5, 9.2.0, 9.2.1, 9.2.2, 9.2.3, 9.2.4, 9.2.5, 9.2.x-dev, dev-master, 9.3.x-dev] but these conflict with your requirements or minimum-stability.

Bumping the PHPunit version helps the installation to run.

Issue two:

Error message:

Fatal error: Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in /Applications/XAMPP/xamppfiles/htdocs/532/wp-content/plugins/billecta-test/lib/JPB/TestTools/TestCase.php:8
Stack trace:
#0 /Applications/XAMPP/xamppfiles/htdocs/532/wp-content/plugins/billecta-test/vendor/composer/ClassLoader.php(444): include()
#1 /Applications/XAMPP/xamppfiles/htdocs/532/wp-content/plugins/billecta-test/vendor/composer/ClassLoader.php(322): Composer\Autoload\includeFile('/Applications/X...')
#2 [internal function]: Composer\Autoload\ClassLoader->loadClass('JPB\\TestTools\\T...')
#3 /Applications/XAMPP/xamppfiles/htdocs/532/wp-content/plugins/billecta-test/tests/SampleTest.php(5): spl_autoload_call('JPB\\TestTools\\T...')
#4 phar:///usr/local/bin/phpunit/phpunit/Util/FileLoader.php(49): include_once('/Applications/X...')
#5 phar:///usr/local/bin/phpunit/phpunit/Util/FileLoader.php(40): PHPUnit\Util\FileLoader::load('/Applications/X...')
#6 phar:///usr/local/bin/phpunit/phpunit/Framework/TestSuite.php(267): PHPUnit\Util\FileLoad in /Applications/XAMPP/xamppfiles/htdocs/532/wp-content/plugins/billecta-test/lib/JPB/TestTools/TestCase.php on line 8```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions