release 1.15.5 (#2848)
This commit is contained in:
@@ -7,15 +7,6 @@ coverage:
|
||||
round: down
|
||||
range: "80...100"
|
||||
|
||||
status:
|
||||
project:
|
||||
default:
|
||||
threshold: 0.5%
|
||||
patch:
|
||||
default:
|
||||
threshold: 50%
|
||||
changes: no
|
||||
|
||||
parsers:
|
||||
gcov:
|
||||
branch_detection:
|
||||
|
||||
@@ -67,7 +67,7 @@ class Customer implements EntityWithMetaFields, EntityWithBudget
|
||||
* @var string
|
||||
*
|
||||
* @Serializer\Expose()
|
||||
* @Serializer\Groups({"Customer_Entity"})
|
||||
* @Serializer\Groups({"Default"})
|
||||
*
|
||||
* @Exporter\Expose(label="label.number")
|
||||
*
|
||||
|
||||
@@ -27,7 +27,6 @@ class UserRolesType extends AbstractType
|
||||
{
|
||||
$builder
|
||||
->add('roles', UserRoleType::class, [
|
||||
'label' => 'label.roles',
|
||||
'multiple' => true,
|
||||
'expanded' => true,
|
||||
])
|
||||
|
||||
@@ -27,7 +27,6 @@ class UserTeamsType extends AbstractType
|
||||
{
|
||||
$builder
|
||||
->add('teams', TeamType::class, [
|
||||
'label' => 'label.team',
|
||||
'multiple' => true,
|
||||
'expanded' => true,
|
||||
])
|
||||
|
||||
@@ -211,7 +211,7 @@ class TeamRepository extends EntityRepository
|
||||
$or->add(
|
||||
$qb->expr()->andX(
|
||||
$qb->expr()->eq('members.user', ':id'),
|
||||
$qb->expr()->eq('members.teamlead', true),
|
||||
$qb->expr()->eq('members.teamlead', true)
|
||||
)
|
||||
);
|
||||
$qb->setParameter('id', $user);
|
||||
|
||||
@@ -368,6 +368,7 @@ abstract class APIControllerBaseTest extends ControllerBaseTest
|
||||
'name' => 'string',
|
||||
'visible' => 'bool',
|
||||
'color' => '@string',
|
||||
'number' => '@string',
|
||||
];
|
||||
|
||||
// if a list of customers is loaded
|
||||
@@ -377,6 +378,7 @@ abstract class APIControllerBaseTest extends ControllerBaseTest
|
||||
'name' => 'string',
|
||||
'visible' => 'boolean',
|
||||
'color' => '@string',
|
||||
'number' => '@string',
|
||||
'metaFields' => ['result' => 'array', 'type' => 'CustomerMeta'],
|
||||
'teams' => ['result' => 'array', 'type' => 'Team'],
|
||||
'currency' => 'string', // since 1.10
|
||||
|
||||
48
tests/Utils/CommandStyleTest.php
Normal file
48
tests/Utils/CommandStyleTest.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<?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\Utils;
|
||||
|
||||
use App\Utils\CommandStyle;
|
||||
use App\Validator\ValidationFailedException;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\Console\Input\ArrayInput;
|
||||
use Symfony\Component\Console\Output\BufferedOutput;
|
||||
use Symfony\Component\Validator\ConstraintViolation;
|
||||
use Symfony\Component\Validator\ConstraintViolationList;
|
||||
|
||||
/**
|
||||
* @covers \App\Utils\CommandStyle
|
||||
*/
|
||||
class CommandStyleTest extends TestCase
|
||||
{
|
||||
public function testStyles()
|
||||
{
|
||||
$input = new ArrayInput([]);
|
||||
$output = new BufferedOutput();
|
||||
|
||||
$sut = new CommandStyle($input, $output);
|
||||
$sut->error('FooBar-Error');
|
||||
$sut->warning('Hello-Warning');
|
||||
$sut->success('World-Success');
|
||||
|
||||
$exception = new ValidationFailedException(new ConstraintViolationList([
|
||||
new ConstraintViolation('123', null, [], $this, null, 123),
|
||||
new ConstraintViolation('456', null, [], $this, null, 456),
|
||||
]));
|
||||
$sut->validationError($exception);
|
||||
|
||||
$result = $output->fetch();
|
||||
self::assertStringContainsString('[ERROR] FooBar-Error', $result);
|
||||
self::assertStringContainsString('[WARNING] Hello-Warning', $result);
|
||||
self::assertStringContainsString('[OK] World-Success', $result);
|
||||
self::assertStringContainsString('[ERROR] (123)', $result);
|
||||
self::assertStringContainsString('[ERROR] (456)', $result);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user