for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Moodle component manager.
*
* @author Luke Carrier <[email protected]>
* @copyright 2016 Luke Carrier
* @license GPL-3.0+
*/
use ComponentManager\MoodleVersion;
use PHPUnit\Framework\TestCase;
* @coversDefaultClass \ComponentManager\MoodleVersion
class MoodleVersionTestTest extends TestCase {
You can fix this by adding a namespace to your class:
namespace YourVendor; class YourClass { }
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.
public function testSatisfies() {
$version = new MoodleVersion(
'2017051502.06', '3.3.2+ (Build: 20171006)', '3.3', 200, '');
$this->assertEquals(100, $version->satisfies('2017051502.06'));
$this->assertEquals(100, $version->satisfies('3.3+'));
$this->assertEquals(50, $version->satisfies('3.3'));
$this->assertEquals(0, $version->satisfies('2017051502'));
}
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.