improved invoice handling for fixed rates (#1058)
This commit is contained in:
@@ -9,8 +9,8 @@
|
||||
|
||||
namespace App\Tests\Invoice\Renderer;
|
||||
|
||||
use App\Invoice\InvoiceModel;
|
||||
use App\Invoice\Renderer\CsvRenderer;
|
||||
use App\Model\InvoiceModel;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\HttpFoundation\BinaryFileResponse;
|
||||
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
namespace App\Tests\Invoice\Renderer;
|
||||
|
||||
use App\Entity\InvoiceDocument;
|
||||
use App\Invoice\InvoiceModel;
|
||||
use App\Invoice\Renderer\RendererTrait;
|
||||
use App\Invoice\RendererInterface;
|
||||
use App\Model\InvoiceModel;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
class DebugRenderer implements RendererInterface
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
namespace App\Tests\Invoice\Renderer;
|
||||
|
||||
use App\Entity\InvoiceDocument;
|
||||
use App\Model\InvoiceModel;
|
||||
use App\Invoice\InvoiceModel;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
|
||||
namespace App\Tests\Invoice\Renderer;
|
||||
|
||||
use App\Invoice\InvoiceModel;
|
||||
use App\Invoice\Renderer\OdsRenderer;
|
||||
use App\Model\InvoiceModel;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\HttpFoundation\BinaryFileResponse;
|
||||
|
||||
|
||||
@@ -22,9 +22,9 @@ use App\Entity\Timesheet;
|
||||
use App\Entity\TimesheetMeta;
|
||||
use App\Entity\User;
|
||||
use App\Invoice\Calculator\DefaultCalculator;
|
||||
use App\Invoice\InvoiceModel;
|
||||
use App\Invoice\NumberGenerator\DateNumberGenerator;
|
||||
use App\Invoice\Renderer\AbstractRenderer;
|
||||
use App\Model\InvoiceModel;
|
||||
use App\Repository\Query\InvoiceQuery;
|
||||
use App\Twig\DateExtensions;
|
||||
use App\Twig\Extensions;
|
||||
@@ -82,10 +82,7 @@ trait RendererTestTrait
|
||||
return new $classname($translator, $dateExtension, $extensions);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return InvoiceModel
|
||||
*/
|
||||
protected function getInvoiceModel()
|
||||
protected function getInvoiceModel(): InvoiceModel
|
||||
{
|
||||
$customer = new Customer();
|
||||
$customer->setCurrency('EUR');
|
||||
|
||||
@@ -65,6 +65,6 @@ class TwigRendererTest extends KernelTestCase
|
||||
$this->assertContains('<h2 class="page-header">
|
||||
<span contenteditable="true">a test invoice template title</span>
|
||||
</h2>', $content);
|
||||
$this->assertEquals(5, substr_count($content, 'activity description / project name'));
|
||||
$this->assertEquals(5, substr_count($content, 'activity description'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
|
||||
namespace App\Tests\Invoice\Renderer;
|
||||
|
||||
use App\Invoice\InvoiceModel;
|
||||
use App\Invoice\Renderer\XlsxRenderer;
|
||||
use App\Model\InvoiceModel;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\HttpFoundation\BinaryFileResponse;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user