Release 2.12 (#4609)
This commit is contained in:
@@ -29,7 +29,7 @@ abstract class AbstractActionsSubscriberTest extends TestCase
|
||||
return new $className($auth, $router);
|
||||
}
|
||||
|
||||
protected function assertGetSubscribedEvent(string $className, string $name)
|
||||
public function assertGetSubscribedEvent(string $className, string $name): void
|
||||
{
|
||||
$this->assertTrue(method_exists($className, 'getSubscribedEvents'));
|
||||
$events = $className::getSubscribedEvents();
|
||||
|
||||
@@ -16,7 +16,7 @@ use App\EventSubscriber\Actions\ActivitiesSubscriber;
|
||||
*/
|
||||
class ActivitiesSubscriberTest extends AbstractActionsSubscriberTest
|
||||
{
|
||||
public function testEventName()
|
||||
public function testEventName(): void
|
||||
{
|
||||
$this->assertGetSubscribedEvent(ActivitiesSubscriber::class, 'activities');
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ use App\EventSubscriber\Actions\ActivitySubscriber;
|
||||
*/
|
||||
class ActivitySubscriberTest extends AbstractActionsSubscriberTest
|
||||
{
|
||||
public function testEventName()
|
||||
public function testEventName(): void
|
||||
{
|
||||
$this->assertGetSubscribedEvent(ActivitySubscriber::class, 'activity');
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ use App\EventSubscriber\Actions\CustomerSubscriber;
|
||||
*/
|
||||
class CustomerSubscriberTest extends AbstractActionsSubscriberTest
|
||||
{
|
||||
public function testEventName()
|
||||
public function testEventName(): void
|
||||
{
|
||||
$this->assertGetSubscribedEvent(CustomerSubscriber::class, 'customer');
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ use App\EventSubscriber\Actions\CustomersSubscriber;
|
||||
*/
|
||||
class CustomersSubscriberTest extends AbstractActionsSubscriberTest
|
||||
{
|
||||
public function testEventName()
|
||||
public function testEventName(): void
|
||||
{
|
||||
$this->assertGetSubscribedEvent(CustomersSubscriber::class, 'customers');
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ use App\EventSubscriber\Actions\InvoiceArchiveSubscriber;
|
||||
*/
|
||||
class InvoiceArchiveSubscriberTest extends AbstractActionsSubscriberTest
|
||||
{
|
||||
public function testEventName()
|
||||
public function testEventName(): void
|
||||
{
|
||||
$this->assertGetSubscribedEvent(InvoiceArchiveSubscriber::class, 'invoice_archive');
|
||||
}
|
||||
|
||||
@@ -19,12 +19,12 @@ use App\Model\InvoiceDocument;
|
||||
*/
|
||||
class InvoiceDocumentSubscriberTest extends AbstractActionsSubscriberTest
|
||||
{
|
||||
public function testEventName()
|
||||
public function testEventName(): void
|
||||
{
|
||||
$this->assertGetSubscribedEvent(InvoiceDocumentSubscriber::class, 'invoice_document');
|
||||
}
|
||||
|
||||
public function testActions()
|
||||
public function testActions(): void
|
||||
{
|
||||
$sut = $this->createSubscriber(InvoiceDocumentSubscriber::class, true);
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ use App\EventSubscriber\Actions\InvoiceSubscriber;
|
||||
*/
|
||||
class InvoiceSubscriberTest extends AbstractActionsSubscriberTest
|
||||
{
|
||||
public function testEventName()
|
||||
public function testEventName(): void
|
||||
{
|
||||
$this->assertGetSubscribedEvent(InvoiceSubscriber::class, 'invoice');
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ use App\EventSubscriber\Actions\InvoiceTemplateSubscriber;
|
||||
*/
|
||||
class InvoiceTemplateSubscriberTest extends AbstractActionsSubscriberTest
|
||||
{
|
||||
public function testEventName()
|
||||
public function testEventName(): void
|
||||
{
|
||||
$this->assertGetSubscribedEvent(InvoiceTemplateSubscriber::class, 'invoice_template');
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ use App\EventSubscriber\Actions\InvoiceTemplatesSubscriber;
|
||||
*/
|
||||
class InvoiceTemplatesSubscriberTest extends AbstractActionsSubscriberTest
|
||||
{
|
||||
public function testEventName()
|
||||
public function testEventName(): void
|
||||
{
|
||||
$this->assertGetSubscribedEvent(InvoiceTemplatesSubscriber::class, 'invoice_templates');
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ use App\EventSubscriber\Actions\PermissionsSubscriber;
|
||||
*/
|
||||
class PermissionsSubscriberTest extends AbstractActionsSubscriberTest
|
||||
{
|
||||
public function testEventName()
|
||||
public function testEventName(): void
|
||||
{
|
||||
$this->assertGetSubscribedEvent(PermissionsSubscriber::class, 'user_permissions');
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ use App\EventSubscriber\Actions\PluginSubscriber;
|
||||
*/
|
||||
class PluginSubscriberTest extends AbstractActionsSubscriberTest
|
||||
{
|
||||
public function testEventName()
|
||||
public function testEventName(): void
|
||||
{
|
||||
$this->assertGetSubscribedEvent(PluginSubscriber::class, 'plugin');
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ use App\EventSubscriber\Actions\ProjectSubscriber;
|
||||
*/
|
||||
class ProjectSubscriberTest extends AbstractActionsSubscriberTest
|
||||
{
|
||||
public function testEventName()
|
||||
public function testEventName(): void
|
||||
{
|
||||
$this->assertGetSubscribedEvent(ProjectSubscriber::class, 'project');
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ use App\EventSubscriber\Actions\ProjectsSubscriber;
|
||||
*/
|
||||
class ProjectsSubscriberTest extends AbstractActionsSubscriberTest
|
||||
{
|
||||
public function testEventName()
|
||||
public function testEventName(): void
|
||||
{
|
||||
$this->assertGetSubscribedEvent(ProjectsSubscriber::class, 'projects');
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ use App\EventSubscriber\Actions\TagSubscriber;
|
||||
*/
|
||||
class TagSubscriberTest extends AbstractActionsSubscriberTest
|
||||
{
|
||||
public function testEventName()
|
||||
public function testEventName(): void
|
||||
{
|
||||
$this->assertGetSubscribedEvent(TagSubscriber::class, 'tag');
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ use App\EventSubscriber\Actions\TagsSubscriber;
|
||||
*/
|
||||
class TagsSubscriberTest extends AbstractActionsSubscriberTest
|
||||
{
|
||||
public function testEventName()
|
||||
public function testEventName(): void
|
||||
{
|
||||
$this->assertGetSubscribedEvent(TagsSubscriber::class, 'tags');
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ use App\EventSubscriber\Actions\TeamSubscriber;
|
||||
*/
|
||||
class TeamSubscriberTest extends AbstractActionsSubscriberTest
|
||||
{
|
||||
public function testEventName()
|
||||
public function testEventName(): void
|
||||
{
|
||||
$this->assertGetSubscribedEvent(TeamSubscriber::class, 'team');
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ use App\EventSubscriber\Actions\TeamsSubscriber;
|
||||
*/
|
||||
class TeamsSubscriberTest extends AbstractActionsSubscriberTest
|
||||
{
|
||||
public function testEventName()
|
||||
public function testEventName(): void
|
||||
{
|
||||
$this->assertGetSubscribedEvent(TeamsSubscriber::class, 'teams');
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ use App\EventSubscriber\Actions\TimesheetSubscriber;
|
||||
*/
|
||||
class TimesheetSubscriberTest extends AbstractActionsSubscriberTest
|
||||
{
|
||||
public function testEventName()
|
||||
public function testEventName(): void
|
||||
{
|
||||
$this->assertGetSubscribedEvent(TimesheetSubscriber::class, 'timesheet');
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ use App\EventSubscriber\Actions\TimesheetTeamSubscriber;
|
||||
*/
|
||||
class TimesheetTeamSubscriberTest extends AbstractActionsSubscriberTest
|
||||
{
|
||||
public function testEventName()
|
||||
public function testEventName(): void
|
||||
{
|
||||
$this->assertGetSubscribedEvent(TimesheetTeamSubscriber::class, 'timesheet_team');
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ use App\EventSubscriber\Actions\TimesheetsSubscriber;
|
||||
*/
|
||||
class TimesheetsSubscriberTest extends AbstractActionsSubscriberTest
|
||||
{
|
||||
public function testEventName()
|
||||
public function testEventName(): void
|
||||
{
|
||||
$this->assertGetSubscribedEvent(TimesheetsSubscriber::class, 'timesheets');
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ use App\EventSubscriber\Actions\TimesheetsTeamSubscriber;
|
||||
*/
|
||||
class TimesheetsTeamSubscriberTest extends AbstractActionsSubscriberTest
|
||||
{
|
||||
public function testEventName()
|
||||
public function testEventName(): void
|
||||
{
|
||||
$this->assertGetSubscribedEvent(TimesheetsTeamSubscriber::class, 'timesheets_team');
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ use App\EventSubscriber\Actions\UserSubscriber;
|
||||
*/
|
||||
class UserSubscriberTest extends AbstractActionsSubscriberTest
|
||||
{
|
||||
public function testEventName()
|
||||
public function testEventName(): void
|
||||
{
|
||||
$this->assertGetSubscribedEvent(UserSubscriber::class, 'user');
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ use App\EventSubscriber\Actions\UsersSubscriber;
|
||||
*/
|
||||
class UsersSubscriberTest extends AbstractActionsSubscriberTest
|
||||
{
|
||||
public function testEventName()
|
||||
public function testEventName(): void
|
||||
{
|
||||
$this->assertGetSubscribedEvent(UsersSubscriber::class, 'users');
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ use Symfony\Component\Mime\Email;
|
||||
*/
|
||||
class EmailSubscriberTest extends TestCase
|
||||
{
|
||||
public function testGetSubscribedEvents()
|
||||
public function testGetSubscribedEvents(): void
|
||||
{
|
||||
$events = EmailSubscriber::getSubscribedEvents();
|
||||
$this->assertArrayHasKey(EmailEvent::class, $events);
|
||||
@@ -30,7 +30,7 @@ class EmailSubscriberTest extends TestCase
|
||||
$this->assertTrue(method_exists(EmailSubscriber::class, $methodName));
|
||||
}
|
||||
|
||||
public function testSendIsTriggered()
|
||||
public function testSendIsTriggered(): void
|
||||
{
|
||||
$mailer = $this->createMock(MailerInterface::class);
|
||||
$mailer->expects($this->once())->method('send');
|
||||
|
||||
@@ -25,7 +25,7 @@ use Symfony\Component\Security\Http\Event\LoginSuccessEvent;
|
||||
*/
|
||||
class LastLoginSubscriberTest extends TestCase
|
||||
{
|
||||
public function testGetSubscribedEvents()
|
||||
public function testGetSubscribedEvents(): void
|
||||
{
|
||||
$events = LastLoginSubscriber::getSubscribedEvents();
|
||||
|
||||
@@ -38,7 +38,7 @@ class LastLoginSubscriberTest extends TestCase
|
||||
$this->assertTrue(method_exists(LastLoginSubscriber::class, $methodName));
|
||||
}
|
||||
|
||||
public function testOnImplicitLogin()
|
||||
public function testOnImplicitLogin(): void
|
||||
{
|
||||
$repository = $this->createMock(UserRepository::class);
|
||||
$repository->expects($this->once())->method('saveUser');
|
||||
@@ -53,7 +53,7 @@ class LastLoginSubscriberTest extends TestCase
|
||||
self::assertNotNull($user->getLastLogin());
|
||||
}
|
||||
|
||||
public function testOnLoginSuccessWithUser()
|
||||
public function testOnLoginSuccessWithUser(): void
|
||||
{
|
||||
$repository = $this->createMock(UserRepository::class);
|
||||
$repository->expects($this->once())->method('saveUser');
|
||||
|
||||
@@ -18,7 +18,7 @@ use PHPUnit\Framework\TestCase;
|
||||
*/
|
||||
class MenuSubscriberTest extends TestCase
|
||||
{
|
||||
public function testGetSubscribedEvents()
|
||||
public function testGetSubscribedEvents(): void
|
||||
{
|
||||
$events = MenuSubscriber::getSubscribedEvents();
|
||||
$this->assertArrayHasKey(ConfigureMainMenuEvent::class, $events);
|
||||
|
||||
@@ -24,7 +24,7 @@ use Symfony\Component\HttpKernel\KernelEvents;
|
||||
*/
|
||||
class PagerfantaExceptionSubscriberTest extends TestCase
|
||||
{
|
||||
public function testGetSubscribedEvents()
|
||||
public function testGetSubscribedEvents(): void
|
||||
{
|
||||
$events = PagerfantaExceptionSubscriber::getSubscribedEvents();
|
||||
$this->assertArrayHasKey(KernelEvents::EXCEPTION, $events);
|
||||
@@ -32,7 +32,7 @@ class PagerfantaExceptionSubscriberTest extends TestCase
|
||||
$this->assertTrue(method_exists(PagerfantaExceptionSubscriber::class, $methodName));
|
||||
}
|
||||
|
||||
public function testWithExceptions()
|
||||
public function testWithExceptions(): void
|
||||
{
|
||||
$sut = new PagerfantaExceptionSubscriber();
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ use Symfony\Component\Security\Http\Event\LoginSuccessEvent;
|
||||
*/
|
||||
class ProfileSubscriberTest extends TestCase
|
||||
{
|
||||
public function testGetSubscribedEvents()
|
||||
public function testGetSubscribedEvents(): void
|
||||
{
|
||||
$events = ProfileSubscriber::getSubscribedEvents();
|
||||
|
||||
@@ -36,7 +36,7 @@ class ProfileSubscriberTest extends TestCase
|
||||
$this->assertTrue(method_exists(LastLoginSubscriber::class, $methodName));
|
||||
}
|
||||
|
||||
public function testOnLoginSuccessWithoutProfileSetsDesktop()
|
||||
public function testOnLoginSuccessWithoutProfileSetsDesktop(): void
|
||||
{
|
||||
$manager = new ProfileManager();
|
||||
$sut = new ProfileSubscriber($manager);
|
||||
@@ -58,7 +58,7 @@ class ProfileSubscriberTest extends TestCase
|
||||
self::assertEquals(ProfileManager::PROFILE_DESKTOP, $manager->getProfileFromSession($session));
|
||||
}
|
||||
|
||||
public function testOnLoginSuccessWithProfile()
|
||||
public function testOnLoginSuccessWithProfile(): void
|
||||
{
|
||||
$manager = new ProfileManager();
|
||||
$sut = new ProfileSubscriber($manager);
|
||||
@@ -104,7 +104,7 @@ class ProfileSubscriberTest extends TestCase
|
||||
/**
|
||||
* @dataProvider getInvalidCookies
|
||||
*/
|
||||
public function testOnLoginSuccessWithInvalidProfile(string $cookieValue)
|
||||
public function testOnLoginSuccessWithInvalidProfile(string $cookieValue): void
|
||||
{
|
||||
$manager = new ProfileManager();
|
||||
$sut = new ProfileSubscriber($manager);
|
||||
|
||||
@@ -18,7 +18,7 @@ use PHPUnit\Framework\TestCase;
|
||||
*/
|
||||
class UserDetailsSubscriberTest extends TestCase
|
||||
{
|
||||
public function testGetSubscribedEvents()
|
||||
public function testGetSubscribedEvents(): void
|
||||
{
|
||||
$events = UserDetailsSubscriber::getSubscribedEvents();
|
||||
$this->assertArrayHasKey(UserDetailsEvent::class, $events);
|
||||
|
||||
@@ -18,7 +18,7 @@ use Symfony\Component\HttpKernel\KernelEvents;
|
||||
*/
|
||||
class WizardSubscriberTest extends TestCase
|
||||
{
|
||||
public function testGetSubscribedEvents()
|
||||
public function testGetSubscribedEvents(): void
|
||||
{
|
||||
$events = WizardSubscriber::getSubscribedEvents();
|
||||
$this->assertArrayHasKey(KernelEvents::REQUEST, $events);
|
||||
|
||||
Reference in New Issue
Block a user