summaryrefslogtreecommitdiff
path: root/vendor/symfony/http-kernel/Tests/KernelTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/symfony/http-kernel/Tests/KernelTest.php')
-rw-r--r--vendor/symfony/http-kernel/Tests/KernelTest.php19
1 files changed, 16 insertions, 3 deletions
diff --git a/vendor/symfony/http-kernel/Tests/KernelTest.php b/vendor/symfony/http-kernel/Tests/KernelTest.php
index 57bd704c92..5be4fc8d83 100644
--- a/vendor/symfony/http-kernel/Tests/KernelTest.php
+++ b/vendor/symfony/http-kernel/Tests/KernelTest.php
@@ -64,6 +64,20 @@ class KernelTest extends TestCase
$this->assertNull($clone->getContainer());
}
+ /**
+ * @expectedException \InvalidArgumentException
+ * @expectedExceptionMessage The environment "test.env" contains invalid characters, it can only contain characters allowed in PHP class names.
+ */
+ public function testClassNameValidityGetter()
+ {
+ // We check the classname that will be generated by using a $env that
+ // contains invalid characters.
+ $env = 'test.env';
+ $kernel = new KernelForTest($env, false);
+
+ $kernel->boot();
+ }
+
public function testInitializeContainerClearsOldContainers()
{
$fs = new Filesystem();
@@ -330,9 +344,8 @@ EOF;
$env = 'test_env';
$debug = true;
$kernel = new KernelForTest($env, $debug);
-
- $expected = serialize([$env, $debug]);
- $this->assertEquals($expected, $kernel->serialize());
+ $expected = "O:57:\"Symfony\Component\HttpKernel\Tests\Fixtures\KernelForTest\":2:{s:14:\"\0*\0environment\";s:8:\"test_env\";s:8:\"\0*\0debug\";b:1;}";
+ $this->assertEquals($expected, serialize($kernel));
}
/**