enhanced plugin support (#634)

- refactored admin controller and templates
- plugin support for entity actions
- changed column mail to email in customer table
- refactored theme events
This commit is contained in:
Kevin Papst
2019-03-11 14:46:30 +01:00
committed by GitHub
parent 519be2d5a2
commit 3ac72a5c89
104 changed files with 1878 additions and 976 deletions

View File

@@ -10,6 +10,7 @@
namespace App\Tests\Twig;
use App\Entity\Timesheet;
use App\Entity\User;
use App\Twig\Extensions;
use App\Utils\LocaleSettings;
use PHPUnit\Framework\TestCase;
@@ -60,7 +61,7 @@ class ExtensionsTest extends TestCase
public function testGetFunctions()
{
$functions = ['locales', 'is_visible_column', 'is_datatable_configured'];
$functions = ['locales', 'is_visible_column', 'is_datatable_configured', 'class_name'];
$sut = $this->getSut($this->localeDe);
$twigFunctions = $sut->getFunctions();
$this->assertCount(count($functions), $twigFunctions);
@@ -244,4 +245,14 @@ class ExtensionsTest extends TestCase
$this->assertEquals($expected, $result);
}
}
public function testGetClassName()
{
$sut = $this->getSut($this->localeEn);
$this->assertEquals('DateTime', $sut->getClassName(new \DateTime()));
$this->assertEquals('stdClass', $sut->getClassName(new \stdClass()));
$this->assertNull($sut->getClassName(''));
$this->assertNull($sut->getClassName(null));
$this->assertEquals('App\Entity\User', $sut->getClassName(new User()));
}
}