cancel
Showing results for 
Search instead for 
Did you mean: 

Fatal error in test automation mock class

Fatal error in test automation mock class

I've set up a sandbox (PHP7, linux) with a clean installation of Magento 2.1. When I run dev:tests:run, phpunit throws a fatal error about 8000 operations into the unit-testing process:

 

PHP Fatal error: Uncaught Error: Call to undefined method Mock_SoapClient_a58256b2::__setSoapHeaders() in /home/experius/domains/kasper.mage2.sandbox20.xpdev.nl/vendor/magento/module-payment/Gateway/Http/Client/Soap.php:70
Stack trace:
#0 /home/experius/domains/kasper.mage2.sandbox20.xpdev.nl/vendor/magento/module-payment/Test/Unit/Gateway/Http/Client/SoapTest.php(95): Magento\Payment\Gateway\Http\Client\Soap->placeRequest(Object(Mock_TransferInterface_7258632b))
#1 [internal function]: Magento\Payment\Test\Unit\Gateway\Http\Client\SoapTest->testPlaceRequest()
#2 /home/experius/domains/kasper.mage2.sandbox20.xpdev.nl/vendor/phpunit/phpunit/src/Framework/TestCase.php(950): ReflectionMethod->invokeArgs(Object(Magento\Payment\Test\Unit\Gateway\Http\Client\SoapTest), Array)
#3 /home/experius/domains/kasper.mage2.sandbox20.xpdev.nl/vendor/phpunit/phpunit/src/Framework/TestCase.php(817): PHPUnit_Framework_TestCase->runTest()
#4 /home/experius/domains/kasper.mage2.sandbox20.xpdev.nl/vendor/phpunit/phpunit/src/Framework/TestResult.ph in /home/experius/domains/kasper.mage2.sandbox20.xpdev.nl/vendor/magento/module-payment/Gateway/Http/Client/Soap.php on line 70

 

It then skips the remaining 9000 lines of unit testing before going into static tests.

 

It seems like one of the mock classes generated for automated testing isn't programmed to have all the proper methods. 

Am I doing something wrong, or is this a bug in phpunit or Magento 2? A couple of other tests fail, too, despite being a clean installation.