"fntneves/laravel-transactional-events": "^1.8" resolved to 1.8.9
"laravel/framework": "^7.0" resolved to 7.11.0
"phpunit/phpunit": "^8.5" resolved to 8.5.4
Sample code:
<?php
namespace Tests\Unit;
use App\User;
use Neves\Testing\DatabaseTransactions;
use Tests\TestCase;
class UserTest extends TestCase
{
use DatabaseTransactions; // squiggly here
public function testSquiggly()
{
$this->assertInstanceOf(
User::class,
factory(User::class)->create(),
'this is not a real test'
);
}
}
Screenshot of sample code in PHPStorm:
Message shown on squiggly hover:
Trait method 'beginDatabaseTransaction' will not be applied, because it collides with 'DatabaseTransactions'
Perhaps this is more of a PHPStorm bug? The method does seem to be applied. Adding dd('foo') to the beginning of it:
use BaseDatabaseTransactions;
public function beginDatabaseTransaction()
{
dd('foo');
$emptyDispatcher = new \Illuminate\Events\Dispatcher;
Successfully prints 'foo':
application@68261664050d:/app$ vendor/bin/phpunit --filter UserTest
PHPUnit 8.5.4 by Sebastian Bergmann and contributors.
.."foo"
Versions:
"fntneves/laravel-transactional-events": "^1.8"
resolved to1.8.9
"laravel/framework": "^7.0"
resolved to7.11.0
"phpunit/phpunit": "^8.5"
resolved to8.5.4
Sample code:
Screenshot of sample code in PHPStorm:
Message shown on squiggly hover:
Perhaps this is more of a PHPStorm bug? The method does seem to be applied. Adding
dd('foo')
to the beginning of it:Successfully prints 'foo':
And no fatal errors are emitted by PHP itself.