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:
@@ -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()));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user