replace travis with github actions (#1452)

This commit is contained in:
Kevin Papst
2020-02-09 23:54:04 +01:00
committed by GitHub
parent 986d922855
commit e06314e802
11 changed files with 131 additions and 129 deletions

View File

@@ -1,14 +0,0 @@
MAILER_FROM=kimai@example.com
###> symfony/framework-bundle ###
APP_ENV=dev
APP_SECRET=c88c14fa70a424e7a12d459b9dd9df7f
###< symfony/framework-bundle ###
###> doctrine/doctrine-bundle ###
DATABASE_URL=mysql://travis@127.0.0.1:3306/kimai_migrations
###< doctrine/doctrine-bundle ###
###> symfony/swiftmailer-bundle ###
MAILER_URL=null://localhost
###< symfony/swiftmailer-bundle ###

View File

@@ -1,14 +0,0 @@
MAILER_FROM=kimai@example.com
###> symfony/framework-bundle ###
APP_ENV=dev
APP_SECRET=c88c14fa70a424e7a12d459b9dd9df7f
###< symfony/framework-bundle ###
###> doctrine/doctrine-bundle ###
DATABASE_URL=sqlite:///%kernel.project_dir%/var/data/kimai_migrations.sqlite
###< doctrine/doctrine-bundle ###
###> symfony/swiftmailer-bundle ###
MAILER_URL=null://localhost
###< symfony/swiftmailer-bundle ###

View File

@@ -57,7 +57,8 @@ class CsvRendererTest extends TestCase
$file = $response->getFile();
$this->assertEquals('text/csv', $response->headers->get('Content-Type'));
$this->assertEquals('attachment; filename=200204-customer_with_special_name.csv', $response->headers->get('Content-Disposition'));
$filename = $model->getNumberGenerator()->getInvoiceNumber() . '-customer_with_special_name.csv';
$this->assertEquals('attachment; filename=' . $filename, $response->headers->get('Content-Disposition'));
$this->assertTrue(file_exists($file->getRealPath()));
$content = file_get_contents($file->getRealPath());

View File

@@ -45,9 +45,10 @@ class DocxRendererTest extends TestCase
/** @var BinaryFileResponse $response */
$response = $sut->render($document, $model);
$filename = $model->getNumberGenerator()->getInvoiceNumber() . '-customer_with_special_name.docx';
$file = $response->getFile();
$this->assertEquals('application/vnd.openxmlformats-officedocument.wordprocessingml.document', $response->headers->get('Content-Type'));
$this->assertEquals('attachment; filename=200204-customer_with_special_name.docx', $response->headers->get('Content-Disposition'));
$this->assertEquals('attachment; filename=' . $filename, $response->headers->get('Content-Disposition'));
$this->assertTrue(file_exists($file->getRealPath()));

View File

@@ -56,9 +56,10 @@ class OdsRendererTest extends TestCase
/** @var BinaryFileResponse $response */
$response = $sut->render($document, $model);
$filename = $model->getNumberGenerator()->getInvoiceNumber() . '-customer_with_special_name.ods';
$file = $response->getFile();
$this->assertEquals('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', $response->headers->get('Content-Type'));
$this->assertEquals('attachment; filename=200204-customer_with_special_name.ods', $response->headers->get('Content-Disposition'));
$this->assertEquals('attachment; filename=' . $filename, $response->headers->get('Content-Disposition'));
$this->assertTrue(file_exists($file->getRealPath()));

View File

@@ -62,7 +62,8 @@ class TwigRendererTest extends KernelTestCase
$content = $response->getContent();
$this->assertStringContainsString('<title>200204-customer_with_special_name</title>', $content);
$filename = $model->getNumberGenerator()->getInvoiceNumber() . '-customer_with_special_name';
$this->assertStringContainsString('<title>' . $filename . '</title>', $content);
$this->assertStringContainsString('<h2 class="page-header">
<span contenteditable="true">a very *long* test invoice / template title with [special] character</span>
</h2>', $content);

View File

@@ -56,9 +56,10 @@ class XlsxRendererTest extends TestCase
/** @var BinaryFileResponse $response */
$response = $sut->render($document, $model);
$filename = $model->getNumberGenerator()->getInvoiceNumber() . '-customer_with_special_name.xlsx';
$file = $response->getFile();
$this->assertEquals('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', $response->headers->get('Content-Type'));
$this->assertEquals('attachment; filename=200204-customer_with_special_name.xlsx', $response->headers->get('Content-Disposition'));
$this->assertEquals('attachment; filename=' . $filename, $response->headers->get('Content-Disposition'));
$this->assertTrue(file_exists($file->getRealPath()));