upgraded to phpunit 8 (#1155)

This commit is contained in:
Kevin Papst
2019-10-24 17:35:05 +02:00
committed by GitHub
parent e91e4ff430
commit b0f83291ee
81 changed files with 421 additions and 463 deletions

View File

@@ -86,12 +86,11 @@ class FormConfigurationTest extends TestCase
$this->assertEquals('FR', $sut->find('defaults.customer.country'));
}
/**
* @expectedException \InvalidArgumentException
* @expectedExceptionMessage Unknown config: foobar
*/
public function testUnknownConfigAreNotImportedAndFindingThemThrowsException()
{
$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessage('Unknown config: foobar');
$sut = $this->getSut($this->getDefaultSettings(), [
(new Configuration())->setName('defaults.customer.foobar')->setValue('hello'),
]);

View File

@@ -97,12 +97,11 @@ class LanguageFormattingsTest extends TestCase
$this->assertEquals(['de', 'en', 'pt_BR', 'it', 'fr', 'es', 'ru', 'ar', 'hu'], $sut->getAvailableLanguages());
}
/**
* @expectedException \InvalidArgumentException
* @expectedExceptionMessage Unknown locale given: xx
*/
public function testInvalidLocaleWithGivenLocale()
{
$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessage('Unknown locale given: xx');
$sut = $this->getSut($this->getDefaultSettings());
$sut->getDateFormat('xx');
}
@@ -163,12 +162,11 @@ class LanguageFormattingsTest extends TestCase
$this->assertEquals('H:i:s', $sut->getTimeFormat('en'));
}
/**
* @expectedException \InvalidArgumentException
* @expectedExceptionMessage Unknown setting for locale en: date_time_type
*/
public function testUnknownSetting()
{
$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessage('Unknown setting for locale en: date_time_type');
$sut = $this->getSut(['en' => [
'xxx' => 'dd.MM.yyyy HH:mm',
]]);

View File

@@ -100,12 +100,11 @@ class SystemConfigurationTest extends TestCase
$this->assertEquals(false, $sut->find('timesheet.rules.allow_future_times'));
}
/**
* @expectedException \InvalidArgumentException
* @expectedExceptionMessage Unknown config: foo
*/
public function testUnknownConfigAreNotImportedAndFindingThemThrowsException()
{
$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessage('Unknown config: foo');
$sut = $this->getSut($this->getDefaultSettings(), [
(new Configuration())->setName('timesheet.foo')->setValue('hello'),
]);

View File

@@ -102,12 +102,11 @@ class TimesheetConfigurationTest extends TestCase
$this->assertEquals(false, $sut->find('timesheet.rules.allow_future_times'));
}
/**
* @expectedException \InvalidArgumentException
* @expectedExceptionMessage Unknown config: foo
*/
public function testUnknownConfigAreNotImportedAndFindingThemThrowsException()
{
$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessage('Unknown config: foo');
$sut = $this->getSut($this->getDefaultSettings(), [
(new Configuration())->setName('timesheet.foo')->setValue('hello'),
]);