mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-17 17:47:13 +00:00
Drop support for PHP < 7.2 and improve test matrix (#868)
* travis: use explicit test matrix and drop PHP < 7.2 * composer: use more liberal version requirements for orchestra This is to easier satisfy when we want to use older Laravel versions on travis * tests: add shim for assertStringContainsString for older Laravel/phpunit versions Specifically, Laravel 5.5 works with an older phpunit version, which does not feature assertStringContainsString * composer: bump minimum PHP version to 7.2 * travis: explicitly install Mockery for testing older Laravel versions * composer: make mockery a root requirement and remove the one from travis * travis: further improve based on suggestions from https://github.com/fruitcake/laravel-cors/blob/master/.travis.yml * tests: skip test if mixin markers are already present in model We're also testing Laravel 5.5 which contains them (they were removed later)
This commit is contained in:
committed by
Barry vd. Heuvel
parent
44f289f76a
commit
015cc6c493
@@ -14,12 +14,11 @@ class EloquentCommandTest extends TestCase
|
||||
public function testCommand()
|
||||
{
|
||||
$modelFilename = $this->getVendorModelFilename();
|
||||
|
||||
// Ensure the mixins are not present
|
||||
$modelSource = file_get_contents($modelFilename);
|
||||
$this->assertStringNotContainsString('* @mixin \\Eloquent', $modelSource);
|
||||
$this->assertStringNotContainsString('* @mixin \\Illuminate\\Database\\Eloquent\\Builder', $modelSource);
|
||||
$this->assertStringNotContainsString('* @mixin \\Illuminate\\Database\\Query\\Builder', $modelSource);
|
||||
if (false !== strpos($modelSource, '* @mixin')) {
|
||||
$msg = sprintf('Class %s already contains the @mixin markers', Model::class);
|
||||
$this->markTestSkipped($msg);
|
||||
}
|
||||
|
||||
$actualContent = null;
|
||||
$mockFilesystem = Mockery::mock(Filesystem::class);
|
||||
|
||||
Reference in New Issue
Block a user