added project importer and grandtotal converter (#1468)
This commit is contained in:
29
tests/Event/AbstractCustomerEventTest.php
Normal file
29
tests/Event/AbstractCustomerEventTest.php
Normal file
@@ -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\Event;
|
||||
|
||||
use App\Entity\Customer;
|
||||
use App\Event\AbstractCustomerEvent;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Contracts\EventDispatcher\Event;
|
||||
|
||||
abstract class AbstractCustomerEventTest extends TestCase
|
||||
{
|
||||
abstract protected function createCustomerEvent(Customer $customer): AbstractCustomerEvent;
|
||||
|
||||
public function testGetterAndSetter()
|
||||
{
|
||||
$customer = new Customer();
|
||||
$sut = $this->createCustomerEvent($customer);
|
||||
|
||||
self::assertInstanceOf(Event::class, $sut);
|
||||
self::assertSame($customer, $sut->getCustomer());
|
||||
}
|
||||
}
|
||||
26
tests/Event/CustomerCreateEventTest.php
Normal file
26
tests/Event/CustomerCreateEventTest.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?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\Event;
|
||||
|
||||
use App\Entity\Customer;
|
||||
use App\Event\AbstractCustomerEvent;
|
||||
use App\Event\CustomerCreateEvent;
|
||||
|
||||
/**
|
||||
* @covers \App\Event\AbstractCustomerEvent
|
||||
* @covers \App\Event\CustomerCreateEvent
|
||||
*/
|
||||
class CustomerCreateEventTest extends AbstractCustomerEventTest
|
||||
{
|
||||
protected function createCustomerEvent(Customer $customer): AbstractCustomerEvent
|
||||
{
|
||||
return new CustomerCreateEvent($customer);
|
||||
}
|
||||
}
|
||||
26
tests/Event/CustomerCreatePostEventTest.php
Normal file
26
tests/Event/CustomerCreatePostEventTest.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?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\Event;
|
||||
|
||||
use App\Entity\Customer;
|
||||
use App\Event\AbstractCustomerEvent;
|
||||
use App\Event\CustomerCreatePostEvent;
|
||||
|
||||
/**
|
||||
* @covers \App\Event\AbstractCustomerEvent
|
||||
* @covers \App\Event\CustomerCreatePostEvent
|
||||
*/
|
||||
class CustomerCreatePostEventTest extends AbstractCustomerEventTest
|
||||
{
|
||||
protected function createCustomerEvent(Customer $customer): AbstractCustomerEvent
|
||||
{
|
||||
return new CustomerCreatePostEvent($customer);
|
||||
}
|
||||
}
|
||||
26
tests/Event/CustomerCreatePreEventTest.php
Normal file
26
tests/Event/CustomerCreatePreEventTest.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?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\Event;
|
||||
|
||||
use App\Entity\Customer;
|
||||
use App\Event\AbstractCustomerEvent;
|
||||
use App\Event\CustomerCreatePreEvent;
|
||||
|
||||
/**
|
||||
* @covers \App\Event\AbstractCustomerEvent
|
||||
* @covers \App\Event\CustomerCreatePreEvent
|
||||
*/
|
||||
class CustomerCreatePreEventTest extends AbstractCustomerEventTest
|
||||
{
|
||||
protected function createCustomerEvent(Customer $customer): AbstractCustomerEvent
|
||||
{
|
||||
return new CustomerCreatePreEvent($customer);
|
||||
}
|
||||
}
|
||||
26
tests/Event/CustomerUpdatePostEventTest.php
Normal file
26
tests/Event/CustomerUpdatePostEventTest.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?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\Event;
|
||||
|
||||
use App\Entity\Customer;
|
||||
use App\Event\AbstractCustomerEvent;
|
||||
use App\Event\CustomerUpdatePostEvent;
|
||||
|
||||
/**
|
||||
* @covers \App\Event\AbstractCustomerEvent
|
||||
* @covers \App\Event\CustomerUpdatePostEvent
|
||||
*/
|
||||
class CustomerUpdatePostEventTest extends AbstractCustomerEventTest
|
||||
{
|
||||
protected function createCustomerEvent(Customer $customer): AbstractCustomerEvent
|
||||
{
|
||||
return new CustomerUpdatePostEvent($customer);
|
||||
}
|
||||
}
|
||||
26
tests/Event/CustomerUpdatePreEventTest.php
Normal file
26
tests/Event/CustomerUpdatePreEventTest.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?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\Event;
|
||||
|
||||
use App\Entity\Customer;
|
||||
use App\Event\AbstractCustomerEvent;
|
||||
use App\Event\CustomerUpdatePreEvent;
|
||||
|
||||
/**
|
||||
* @covers \App\Event\AbstractCustomerEvent
|
||||
* @covers \App\Event\CustomerUpdatePreEvent
|
||||
*/
|
||||
class CustomerUpdatePreEventTest extends AbstractCustomerEventTest
|
||||
{
|
||||
protected function createCustomerEvent(Customer $customer): AbstractCustomerEvent
|
||||
{
|
||||
return new CustomerUpdatePreEvent($customer);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user