@@ -65,7 +65,7 @@ class ActivityManagerTest extends TestCase {
|
||||
/** @var string */
|
||||
private $userId = 'admin';
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
$this->manager = $this->createMock(IManager::class);
|
||||
$this->permissionService = $this->createMock(PermissionService::class);
|
||||
$this->boardMapper = $this->createMock(BoardMapper::class);
|
||||
@@ -97,7 +97,7 @@ class ActivityManagerTest extends TestCase {
|
||||
if (strpos($constant, 'SUBJECT') === 0) {
|
||||
$format = $this->activityManager->getActivityFormat($value, [], false);
|
||||
if ($format !== '') {
|
||||
$this->assertContains('{user}', $format);
|
||||
$this->assertStringContainsString('{user}', $format);
|
||||
} else {
|
||||
/** @noinspection ForgottenDebugOutputInspection */
|
||||
print_r('No activity string found for '. $constant . PHP_EOL);
|
||||
|
||||
@@ -28,7 +28,7 @@ use PHPUnit\Framework\TestCase;
|
||||
|
||||
class ChangeSetTest extends TestCase {
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
}
|
||||
|
||||
public function testChangeSetScalar() {
|
||||
|
||||
@@ -56,7 +56,7 @@ class CommentEventHandlerTest extends TestCase {
|
||||
/** @var CardMapper */
|
||||
private $cardMapper;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
$this->activityManager = $this->createMock(ActivityManager::class);
|
||||
$this->notificationHelper = $this->createMock(NotificationHelper::class);
|
||||
$this->cardMapper = $this->createMock(CardMapper::class);
|
||||
|
||||
@@ -59,7 +59,7 @@ class DeckProviderTest extends TestCase {
|
||||
/** @var string */
|
||||
private $userId = 'admin';
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
$this->l10n = $this->createMock(IL10N::class);
|
||||
$this->urlGenerator = $this->createMock(IURLGenerator::class);
|
||||
$this->activityManager = $this->createMock(ActivityManager::class);
|
||||
@@ -101,10 +101,8 @@ class DeckProviderTest extends TestCase {
|
||||
return $event;
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \InvalidArgumentException
|
||||
*/
|
||||
public function testParseFailureApp() {
|
||||
$this->expectException(\InvalidArgumentException::class);
|
||||
$event = $this->createMock(IEvent::class);
|
||||
$event->expects($this->once())->method('getApp')->willReturn('notdeck');
|
||||
$this->provider->parse('en_US', $event, $event);
|
||||
|
||||
@@ -39,7 +39,7 @@ class FilterTest extends TestCase {
|
||||
/** @var IURLGenerator|MockObject */
|
||||
private $urlGenerator;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
$this->l10n = $this->createMock(IL10N::class);
|
||||
$this->urlGenerator = $this->createMock(IURLGenerator::class);
|
||||
$this->filter = new Filter($this->l10n, $this->urlGenerator);
|
||||
|
||||
@@ -33,7 +33,7 @@ class SettingTest extends TestCase {
|
||||
/** @var Setting */
|
||||
private $setting;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
$this->l10n = $this->createMock(IL10N::class);
|
||||
$this->l10n->expects($this->any())->method('t')->will($this->returnCallback(function ($s) { return $s; }));
|
||||
$this->setting = new Setting($this->l10n);
|
||||
|
||||
Reference in New Issue
Block a user