bringyourownideas /
silverstripe-composer-update-checker
| 1 | <?php |
||
| 2 | |||
| 3 | namespace BringYourOwnIdeas\UpdateChecker\Tests\Extensions; |
||
| 4 | |||
| 5 | use BringYourOwnIdeas\Maintenance\Model\Package; |
||
| 6 | use BringYourOwnIdeas\UpdateChecker\Extensions\ComposerUpdateExtension; |
||
| 7 | use PHPUnit_Framework_TestCase; |
||
|
0 ignored issues
–
show
|
|||
| 8 | use SilverStripe\Dev\SapphireTest; |
||
| 9 | |||
| 10 | /** |
||
| 11 | * @mixin PHPUnit_Framework_TestCase |
||
| 12 | */ |
||
| 13 | class ComposerUpdateExtensionTest extends SapphireTest |
||
| 14 | { |
||
| 15 | protected static $fixture_file = 'ComposerUpdateExtensionTest.yml'; |
||
| 16 | |||
| 17 | protected static $required_extensions = [ |
||
| 18 | Package::class => [ |
||
| 19 | ComposerUpdateExtension::class, |
||
| 20 | ], |
||
| 21 | ]; |
||
| 22 | |||
| 23 | public function testAvailableVersionIsNotShownWhenSameAsCurrent() |
||
| 24 | { |
||
| 25 | /** @var Package|ComposerUpdateExtension $package */ |
||
| 26 | $package = $this->objFromFixture(Package::class, 'up_to_date'); |
||
| 27 | $this->assertEmpty($package->getAvailableVersion()); |
||
| 28 | } |
||
| 29 | |||
| 30 | public function testAvailableVersionIsShown() |
||
| 31 | { |
||
| 32 | /** @var Package|ComposerUpdateExtension $package */ |
||
| 33 | $package = $this->objFromFixture(Package::class, 'has_available_update'); |
||
| 34 | $this->assertSame('1.2.1', $package->getAvailableVersion()); |
||
| 35 | } |
||
| 36 | } |
||
| 37 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths