@crawdaddy Yeah it has done. Have you found a solution? Massively frustrating as everything ran fine and passes last week.
I've literally been trying to resolve this all day.
Hi,
I had a working test suite however two things have change on my local environment. 1) I've upgrade Homestead to version 7 and 2) I've upgraded my app to Laravel 5.6.
Now I'm having issues with PHPUnit exhausting memory allocation unless I add ini_set('memory_limit', '1024M'); to the start of my createApplication method. My test suite then progresses a bit further but eventually stalls entirely.
The strange thing is if I run the test that the suite stalls on in isolation it passes. In fact if I just test the entire file, which may contain 10 tests, the tests all pass. It only stalls when trying to test the entire suite in one go...
It's as if things aren't getting cleaned up between tests it's just filling up memory and freezing.
But I'm using the default TestCase tearDown method:
/**
* Clean up the testing environment before the next test.
*
* @return void
*/
protected function tearDown()
{
if ($this->app) {
foreach ($this->beforeApplicationDestroyedCallbacks as $callback) {
call_user_func($callback);
}
$this->app->flush();
$this->app = null;
}
$this->setUpHasRun = false;
if (property_exists($this, 'serverVariables')) {
$this->serverVariables = [];
}
if (property_exists($this, 'defaultHeaders')) {
$this->defaultHeaders = [];
}
if (class_exists('Mockery')) {
if ($container = Mockery::getContainer()) {
$this->addToAssertionCount($container->mockery_getExpectationCount());
}
Mockery::close();
}
if (class_exists(Carbon::class)) {
Carbon::setTestNow();
}
$this->afterApplicationCreatedCallbacks = [];
$this->beforeApplicationDestroyedCallbacks = [];
Artisan::forgetBootstrappers();
}
Which from my understand so reset everything between tests.
I'm using sqlite in memory as my database for testing.
Anyone else experience problems since upgrading?
I switched back to php 7.1 in homestead cli and it fixed it for me just now!
I thought I had specified my PHP Version in my homestead.yaml but it wasn't the same version in the cli.
I don't know if this'll help your specific problem but it fixed mine.
Just tried the same on my desktop pc and it fixed the issue there for me as well.
Please or to participate in this conversation.