refactored page actions to event subscriber (#2420)
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Tests\EventSubscriber\Actions;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* @covers \App\EventSubscriber\Actions\AbstractActionsSubscriber
|
||||
*/
|
||||
abstract class AbstractActionsSubscriberTest extends TestCase
|
||||
{
|
||||
protected function assertGetSubscribedEvent(string $className, string $name)
|
||||
{
|
||||
$this->assertTrue(method_exists($className, 'getSubscribedEvents'));
|
||||
$events = $className::getSubscribedEvents();
|
||||
$actionName = array_keys($events)[0];
|
||||
$config = $events[$actionName];
|
||||
$this->assertEquals('actions.' . $name, $actionName);
|
||||
$this->assertTrue(method_exists($className, $config[0]));
|
||||
$this->assertEquals(1000, $config[1]);
|
||||
}
|
||||
}
|
||||
23
tests/EventSubscriber/Actions/ActivitiesSubscriberTest.php
Normal file
23
tests/EventSubscriber/Actions/ActivitiesSubscriberTest.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Tests\EventSubscriber\Actions;
|
||||
|
||||
use App\EventSubscriber\Actions\ActivitiesSubscriber;
|
||||
|
||||
/**
|
||||
* @covers \App\EventSubscriber\Actions\ActivitiesSubscriber
|
||||
*/
|
||||
class ActivitiesSubscriberTest extends AbstractActionsSubscriberTest
|
||||
{
|
||||
public function testEventName()
|
||||
{
|
||||
$this->assertGetSubscribedEvent(ActivitiesSubscriber::class, 'activities');
|
||||
}
|
||||
}
|
||||
23
tests/EventSubscriber/Actions/ActivitySubscriberTest.php
Normal file
23
tests/EventSubscriber/Actions/ActivitySubscriberTest.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Tests\EventSubscriber\Actions;
|
||||
|
||||
use App\EventSubscriber\Actions\ActivitySubscriber;
|
||||
|
||||
/**
|
||||
* @covers \App\EventSubscriber\Actions\ActivitySubscriber
|
||||
*/
|
||||
class ActivitySubscriberTest extends AbstractActionsSubscriberTest
|
||||
{
|
||||
public function testEventName()
|
||||
{
|
||||
$this->assertGetSubscribedEvent(ActivitySubscriber::class, 'activity');
|
||||
}
|
||||
}
|
||||
23
tests/EventSubscriber/Actions/CalendarSubscriberTest.php
Normal file
23
tests/EventSubscriber/Actions/CalendarSubscriberTest.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Tests\EventSubscriber\Actions;
|
||||
|
||||
use App\EventSubscriber\Actions\CalendarSubscriber;
|
||||
|
||||
/**
|
||||
* @covers \App\EventSubscriber\Actions\CalendarSubscriber
|
||||
*/
|
||||
class CalendarSubscriberTest extends AbstractActionsSubscriberTest
|
||||
{
|
||||
public function testEventName()
|
||||
{
|
||||
$this->assertGetSubscribedEvent(CalendarSubscriber::class, 'calendar');
|
||||
}
|
||||
}
|
||||
23
tests/EventSubscriber/Actions/CustomerSubscriberTest.php
Normal file
23
tests/EventSubscriber/Actions/CustomerSubscriberTest.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Tests\EventSubscriber\Actions;
|
||||
|
||||
use App\EventSubscriber\Actions\CustomerSubscriber;
|
||||
|
||||
/**
|
||||
* @covers \App\EventSubscriber\Actions\CustomerSubscriber
|
||||
*/
|
||||
class CustomerSubscriberTest extends AbstractActionsSubscriberTest
|
||||
{
|
||||
public function testEventName()
|
||||
{
|
||||
$this->assertGetSubscribedEvent(CustomerSubscriber::class, 'customer');
|
||||
}
|
||||
}
|
||||
23
tests/EventSubscriber/Actions/CustomersSubscriberTest.php
Normal file
23
tests/EventSubscriber/Actions/CustomersSubscriberTest.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Tests\EventSubscriber\Actions;
|
||||
|
||||
use App\EventSubscriber\Actions\CustomersSubscriber;
|
||||
|
||||
/**
|
||||
* @covers \App\EventSubscriber\Actions\CustomersSubscriber
|
||||
*/
|
||||
class CustomersSubscriberTest extends AbstractActionsSubscriberTest
|
||||
{
|
||||
public function testEventName()
|
||||
{
|
||||
$this->assertGetSubscribedEvent(CustomersSubscriber::class, 'customers');
|
||||
}
|
||||
}
|
||||
23
tests/EventSubscriber/Actions/ExportSubscriberTest.php
Normal file
23
tests/EventSubscriber/Actions/ExportSubscriberTest.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Tests\EventSubscriber\Actions;
|
||||
|
||||
use App\EventSubscriber\Actions\ExportSubscriber;
|
||||
|
||||
/**
|
||||
* @covers \App\EventSubscriber\Actions\ExportSubscriber
|
||||
*/
|
||||
class ExportSubscriberTest extends AbstractActionsSubscriberTest
|
||||
{
|
||||
public function testEventName()
|
||||
{
|
||||
$this->assertGetSubscribedEvent(ExportSubscriber::class, 'export');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Tests\EventSubscriber\Actions;
|
||||
|
||||
use App\EventSubscriber\Actions\InvoiceArchiveSubscriber;
|
||||
|
||||
/**
|
||||
* @covers \App\EventSubscriber\Actions\InvoiceArchiveSubscriber
|
||||
*/
|
||||
class InvoiceArchiveSubscriberTest extends AbstractActionsSubscriberTest
|
||||
{
|
||||
public function testEventName()
|
||||
{
|
||||
$this->assertGetSubscribedEvent(InvoiceArchiveSubscriber::class, 'invoice_details');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Tests\EventSubscriber\Actions;
|
||||
|
||||
use App\EventSubscriber\Actions\InvoiceTemplateSubscriber;
|
||||
|
||||
/**
|
||||
* @covers \App\EventSubscriber\Actions\InvoiceTemplateSubscriber
|
||||
*/
|
||||
class InvoiceTemplateSubscriberTest extends AbstractActionsSubscriberTest
|
||||
{
|
||||
public function testEventName()
|
||||
{
|
||||
$this->assertGetSubscribedEvent(InvoiceTemplateSubscriber::class, 'invoice_template');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Tests\EventSubscriber\Actions;
|
||||
|
||||
use App\EventSubscriber\Actions\InvoiceTemplateUploadSubscriber;
|
||||
|
||||
/**
|
||||
* @covers \App\EventSubscriber\Actions\InvoiceTemplateUploadSubscriber
|
||||
*/
|
||||
class InvoiceTemplateUploadSubscriberTest extends AbstractActionsSubscriberTest
|
||||
{
|
||||
public function testEventName()
|
||||
{
|
||||
$this->assertGetSubscribedEvent(InvoiceTemplateUploadSubscriber::class, 'invoice_upload');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Tests\EventSubscriber\Actions;
|
||||
|
||||
use App\EventSubscriber\Actions\InvoiceTemplatesSubscriber;
|
||||
|
||||
/**
|
||||
* @covers \App\EventSubscriber\Actions\InvoiceTemplatesSubscriber
|
||||
*/
|
||||
class InvoiceTemplatesSubscriberTest extends AbstractActionsSubscriberTest
|
||||
{
|
||||
public function testEventName()
|
||||
{
|
||||
$this->assertGetSubscribedEvent(InvoiceTemplatesSubscriber::class, 'invoice_templates');
|
||||
}
|
||||
}
|
||||
23
tests/EventSubscriber/Actions/InvoicesSubscriberTest.php
Normal file
23
tests/EventSubscriber/Actions/InvoicesSubscriberTest.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Tests\EventSubscriber\Actions;
|
||||
|
||||
use App\EventSubscriber\Actions\InvoicesSubscriber;
|
||||
|
||||
/**
|
||||
* @covers \App\EventSubscriber\Actions\InvoicesSubscriber
|
||||
*/
|
||||
class InvoicesSubscriberTest extends AbstractActionsSubscriberTest
|
||||
{
|
||||
public function testEventName()
|
||||
{
|
||||
$this->assertGetSubscribedEvent(InvoicesSubscriber::class, 'invoices');
|
||||
}
|
||||
}
|
||||
23
tests/EventSubscriber/Actions/PermissionsSubscriberTest.php
Normal file
23
tests/EventSubscriber/Actions/PermissionsSubscriberTest.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Tests\EventSubscriber\Actions;
|
||||
|
||||
use App\EventSubscriber\Actions\PermissionsSubscriber;
|
||||
|
||||
/**
|
||||
* @covers \App\EventSubscriber\Actions\PermissionsSubscriber
|
||||
*/
|
||||
class PermissionsSubscriberTest extends AbstractActionsSubscriberTest
|
||||
{
|
||||
public function testEventName()
|
||||
{
|
||||
$this->assertGetSubscribedEvent(PermissionsSubscriber::class, 'user_permissions');
|
||||
}
|
||||
}
|
||||
23
tests/EventSubscriber/Actions/PluginSubscriberTest.php
Normal file
23
tests/EventSubscriber/Actions/PluginSubscriberTest.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Tests\EventSubscriber\Actions;
|
||||
|
||||
use App\EventSubscriber\Actions\PluginSubscriber;
|
||||
|
||||
/**
|
||||
* @covers \App\EventSubscriber\Actions\PluginSubscriber
|
||||
*/
|
||||
class PluginSubscriberTest extends AbstractActionsSubscriberTest
|
||||
{
|
||||
public function testEventName()
|
||||
{
|
||||
$this->assertGetSubscribedEvent(PluginSubscriber::class, 'plugin');
|
||||
}
|
||||
}
|
||||
23
tests/EventSubscriber/Actions/PluginsSubscriberTest.php
Normal file
23
tests/EventSubscriber/Actions/PluginsSubscriberTest.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Tests\EventSubscriber\Actions;
|
||||
|
||||
use App\EventSubscriber\Actions\PluginsSubscriber;
|
||||
|
||||
/**
|
||||
* @covers \App\EventSubscriber\Actions\PluginsSubscriber
|
||||
*/
|
||||
class PluginsSubscriberTest extends AbstractActionsSubscriberTest
|
||||
{
|
||||
public function testEventName()
|
||||
{
|
||||
$this->assertGetSubscribedEvent(PluginsSubscriber::class, 'plugins');
|
||||
}
|
||||
}
|
||||
23
tests/EventSubscriber/Actions/ProjectSubscriberTest.php
Normal file
23
tests/EventSubscriber/Actions/ProjectSubscriberTest.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Tests\EventSubscriber\Actions;
|
||||
|
||||
use App\EventSubscriber\Actions\ProjectSubscriber;
|
||||
|
||||
/**
|
||||
* @covers \App\EventSubscriber\Actions\ProjectSubscriber
|
||||
*/
|
||||
class ProjectSubscriberTest extends AbstractActionsSubscriberTest
|
||||
{
|
||||
public function testEventName()
|
||||
{
|
||||
$this->assertGetSubscribedEvent(ProjectSubscriber::class, 'project');
|
||||
}
|
||||
}
|
||||
23
tests/EventSubscriber/Actions/ProjectsSubscriberTest.php
Normal file
23
tests/EventSubscriber/Actions/ProjectsSubscriberTest.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Tests\EventSubscriber\Actions;
|
||||
|
||||
use App\EventSubscriber\Actions\ProjectsSubscriber;
|
||||
|
||||
/**
|
||||
* @covers \App\EventSubscriber\Actions\ProjectsSubscriber
|
||||
*/
|
||||
class ProjectsSubscriberTest extends AbstractActionsSubscriberTest
|
||||
{
|
||||
public function testEventName()
|
||||
{
|
||||
$this->assertGetSubscribedEvent(ProjectsSubscriber::class, 'projects');
|
||||
}
|
||||
}
|
||||
23
tests/EventSubscriber/Actions/ReportingSubscriberTest.php
Normal file
23
tests/EventSubscriber/Actions/ReportingSubscriberTest.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Tests\EventSubscriber\Actions;
|
||||
|
||||
use App\EventSubscriber\Actions\ReportingSubscriber;
|
||||
|
||||
/**
|
||||
* @covers \App\EventSubscriber\Actions\ReportingSubscriber
|
||||
*/
|
||||
class ReportingSubscriberTest extends AbstractActionsSubscriberTest
|
||||
{
|
||||
public function testEventName()
|
||||
{
|
||||
$this->assertGetSubscribedEvent(ReportingSubscriber::class, 'reporting');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Tests\EventSubscriber\Actions;
|
||||
|
||||
use App\EventSubscriber\Actions\SystemConfigurationSubscriber;
|
||||
|
||||
/**
|
||||
* @covers \App\EventSubscriber\Actions\SystemConfigurationSubscriber
|
||||
*/
|
||||
class SystemConfigurationSubscriberTest extends AbstractActionsSubscriberTest
|
||||
{
|
||||
public function testEventName()
|
||||
{
|
||||
$this->assertGetSubscribedEvent(SystemConfigurationSubscriber::class, 'system_configuration');
|
||||
}
|
||||
}
|
||||
23
tests/EventSubscriber/Actions/TagSubscriberTest.php
Normal file
23
tests/EventSubscriber/Actions/TagSubscriberTest.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Tests\EventSubscriber\Actions;
|
||||
|
||||
use App\EventSubscriber\Actions\TagSubscriber;
|
||||
|
||||
/**
|
||||
* @covers \App\EventSubscriber\Actions\TagSubscriber
|
||||
*/
|
||||
class TagSubscriberTest extends AbstractActionsSubscriberTest
|
||||
{
|
||||
public function testEventName()
|
||||
{
|
||||
$this->assertGetSubscribedEvent(TagSubscriber::class, 'tag');
|
||||
}
|
||||
}
|
||||
23
tests/EventSubscriber/Actions/TagsSubscriberTest.php
Normal file
23
tests/EventSubscriber/Actions/TagsSubscriberTest.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Tests\EventSubscriber\Actions;
|
||||
|
||||
use App\EventSubscriber\Actions\TagsSubscriber;
|
||||
|
||||
/**
|
||||
* @covers \App\EventSubscriber\Actions\TagsSubscriber
|
||||
*/
|
||||
class TagsSubscriberTest extends AbstractActionsSubscriberTest
|
||||
{
|
||||
public function testEventName()
|
||||
{
|
||||
$this->assertGetSubscribedEvent(TagsSubscriber::class, 'tags');
|
||||
}
|
||||
}
|
||||
23
tests/EventSubscriber/Actions/TeamSubscriberTest.php
Normal file
23
tests/EventSubscriber/Actions/TeamSubscriberTest.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Tests\EventSubscriber\Actions;
|
||||
|
||||
use App\EventSubscriber\Actions\TeamSubscriber;
|
||||
|
||||
/**
|
||||
* @covers \App\EventSubscriber\Actions\TeamSubscriber
|
||||
*/
|
||||
class TeamSubscriberTest extends AbstractActionsSubscriberTest
|
||||
{
|
||||
public function testEventName()
|
||||
{
|
||||
$this->assertGetSubscribedEvent(TeamSubscriber::class, 'team');
|
||||
}
|
||||
}
|
||||
23
tests/EventSubscriber/Actions/TeamsSubscriberTest.php
Normal file
23
tests/EventSubscriber/Actions/TeamsSubscriberTest.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Tests\EventSubscriber\Actions;
|
||||
|
||||
use App\EventSubscriber\Actions\TeamsSubscriber;
|
||||
|
||||
/**
|
||||
* @covers \App\EventSubscriber\Actions\TeamsSubscriber
|
||||
*/
|
||||
class TeamsSubscriberTest extends AbstractActionsSubscriberTest
|
||||
{
|
||||
public function testEventName()
|
||||
{
|
||||
$this->assertGetSubscribedEvent(TeamsSubscriber::class, 'teams');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Tests\EventSubscriber\Actions;
|
||||
|
||||
use App\EventSubscriber\Actions\TimesheetMultiUpdateSubscriber;
|
||||
|
||||
/**
|
||||
* @covers \App\EventSubscriber\Actions\TimesheetMultiUpdateSubscriber
|
||||
*/
|
||||
class TimesheetMultiUpdateSubscriberTest extends AbstractActionsSubscriberTest
|
||||
{
|
||||
public function testEventName()
|
||||
{
|
||||
$this->assertGetSubscribedEvent(TimesheetMultiUpdateSubscriber::class, 'timesheets_multi_update');
|
||||
}
|
||||
}
|
||||
23
tests/EventSubscriber/Actions/TimesheetSubscriberTest.php
Normal file
23
tests/EventSubscriber/Actions/TimesheetSubscriberTest.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Tests\EventSubscriber\Actions;
|
||||
|
||||
use App\EventSubscriber\Actions\TimesheetSubscriber;
|
||||
|
||||
/**
|
||||
* @covers \App\EventSubscriber\Actions\TimesheetSubscriber
|
||||
*/
|
||||
class TimesheetSubscriberTest extends AbstractActionsSubscriberTest
|
||||
{
|
||||
public function testEventName()
|
||||
{
|
||||
$this->assertGetSubscribedEvent(TimesheetSubscriber::class, 'timesheet');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Tests\EventSubscriber\Actions;
|
||||
|
||||
use App\EventSubscriber\Actions\TimesheetTeamMultiUpdateSubscriber;
|
||||
|
||||
/**
|
||||
* @covers \App\EventSubscriber\Actions\TimesheetTeamMultiUpdateSubscriber
|
||||
*/
|
||||
class TimesheetTeamMultiUpdateSubscriberTest extends AbstractActionsSubscriberTest
|
||||
{
|
||||
public function testEventName()
|
||||
{
|
||||
$this->assertGetSubscribedEvent(TimesheetTeamMultiUpdateSubscriber::class, 'timesheets_team_multi_update');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Tests\EventSubscriber\Actions;
|
||||
|
||||
use App\EventSubscriber\Actions\TimesheetTeamSubscriber;
|
||||
|
||||
/**
|
||||
* @covers \App\EventSubscriber\Actions\TimesheetTeamSubscriber
|
||||
*/
|
||||
class TimesheetTeamSubscriberTest extends AbstractActionsSubscriberTest
|
||||
{
|
||||
public function testEventName()
|
||||
{
|
||||
$this->assertGetSubscribedEvent(TimesheetTeamSubscriber::class, 'timesheet_team');
|
||||
}
|
||||
}
|
||||
23
tests/EventSubscriber/Actions/TimesheetsSubscriberTest.php
Normal file
23
tests/EventSubscriber/Actions/TimesheetsSubscriberTest.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Tests\EventSubscriber\Actions;
|
||||
|
||||
use App\EventSubscriber\Actions\TimesheetsSubscriber;
|
||||
|
||||
/**
|
||||
* @covers \App\EventSubscriber\Actions\TimesheetsSubscriber
|
||||
*/
|
||||
class TimesheetsSubscriberTest extends AbstractActionsSubscriberTest
|
||||
{
|
||||
public function testEventName()
|
||||
{
|
||||
$this->assertGetSubscribedEvent(TimesheetsSubscriber::class, 'timesheets');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Tests\EventSubscriber\Actions;
|
||||
|
||||
use App\EventSubscriber\Actions\TimesheetsTeamSubscriber;
|
||||
|
||||
/**
|
||||
* @covers \App\EventSubscriber\Actions\TimesheetsTeamSubscriber
|
||||
*/
|
||||
class TimesheetsTeamSubscriberTest extends AbstractActionsSubscriberTest
|
||||
{
|
||||
public function testEventName()
|
||||
{
|
||||
$this->assertGetSubscribedEvent(TimesheetsTeamSubscriber::class, 'timesheets_team');
|
||||
}
|
||||
}
|
||||
23
tests/EventSubscriber/Actions/UserSubscriberTest.php
Normal file
23
tests/EventSubscriber/Actions/UserSubscriberTest.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Tests\EventSubscriber\Actions;
|
||||
|
||||
use App\EventSubscriber\Actions\UserSubscriber;
|
||||
|
||||
/**
|
||||
* @covers \App\EventSubscriber\Actions\UserSubscriber
|
||||
*/
|
||||
class UserSubscriberTest extends AbstractActionsSubscriberTest
|
||||
{
|
||||
public function testEventName()
|
||||
{
|
||||
$this->assertGetSubscribedEvent(UserSubscriber::class, 'user');
|
||||
}
|
||||
}
|
||||
23
tests/EventSubscriber/Actions/UsersSubscriberTest.php
Normal file
23
tests/EventSubscriber/Actions/UsersSubscriberTest.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Tests\EventSubscriber\Actions;
|
||||
|
||||
use App\EventSubscriber\Actions\UsersSubscriber;
|
||||
|
||||
/**
|
||||
* @covers \App\EventSubscriber\Actions\UsersSubscriber
|
||||
*/
|
||||
class UsersSubscriberTest extends AbstractActionsSubscriberTest
|
||||
{
|
||||
public function testEventName()
|
||||
{
|
||||
$this->assertGetSubscribedEvent(UsersSubscriber::class, 'users');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user