deblan.tv/vendor/trinity/src/Trinity/Bundle/AdminBundle/Tests/Configuration/CrudConfigurationTest.php
2015-03-02 21:57:49 +01:00

48 lines
1.1 KiB
PHP

<?php
namespace Trinity\Bundle\AdminBundle\Tests\Configuration;
use Trinity\Bundle\AdminBundle\Configuration\CrudConfiguration;
class CrudConfigurationTest extends \PHPUnit_Framework_TestCase
{
private $configuration;
protected function setUp()
{
$this->configuration = new CrudConfiguration();
}
protected function getConfigurationReflectionMethod($method)
{
$method = new \ReflectionMethod(
'\Trinity\Bundle\AdminBundle\Configuration\CrudConfiguration',
$method
);
$method->setAccessible(true);
return $method;
}
public function testFormatNamespace()
{
$method = $this->getConfigurationReflectionMethod('formatNamespace');
$this->assertEquals(
'Foo\\Bar\\',
$method->invoke(
$this->configuration,
'Foo\\Bar\\'
)
);
$this->assertEquals(
'Foo\\Bar\\',
$method->invoke(
$this->configuration,
'Foo\\Bar'
)
);
}
}