/**
* Unitary tests for Shaarli utilities
*/
-class ApplicationUtilsTest extends \PHPUnit\Framework\TestCase
+class ApplicationUtilsTest extends \Shaarli\TestCase
{
protected static $testUpdateFile = 'sandbox/update.txt';
protected static $testVersion = '0.5.0';
/**
* Test update checks - invalid Git branch
- * @expectedException Exception
*/
public function testCheckUpdateInvalidGitBranch()
{
+ $this->expectException(\Exception::class);
$this->expectExceptionMessageRegExp('/Invalid branch selected for updates/');
ApplicationUtils::checkUpdate('', 'null', 0, true, true, 'unstable');
/**
* Check a unsupported PHP version
- * @expectedException Exception
*/
public function testCheckSupportedPHPVersion51()
{
+ $this->expectException(\Exception::class);
$this->expectExceptionMessageRegExp('/Your PHP version is obsolete/');
$this->assertTrue(ApplicationUtils::checkPHPVersion('5.3', '5.1.0'));
/**
* Check another unsupported PHP version
- * @expectedException Exception
*/
public function testCheckSupportedPHPVersion52()
{
+ $this->expectException(\Exception::class);
$this->expectExceptionMessageRegExp('/Your PHP version is obsolete/');
$this->assertTrue(ApplicationUtils::checkPHPVersion('5.3', '5.2'));