* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\HttpKernel\Tests\ControllerMetadata; use PHPUnit\Framework\TestCase; use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata; class ArgumentMetadataTest extends TestCase { public function testWithBcLayerWithDefault() { $argument = new ArgumentMetadata('foo', 'string', false, true, 'default value'); $this->assertFalse($argument->isNullable()); } public function testDefaultValueAvailable() { $argument = new ArgumentMetadata('foo', 'string', false, true, 'default value', true); $this->assertTrue($argument->isNullable()); $this->assertTrue($argument->hasDefaultValue()); $this->assertSame('default value', $argument->getDefaultValue()); } /** * @expectedException \LogicException */ public function testDefaultValueUnavailable() { $argument = new ArgumentMetadata('foo', 'string', false, false, null, false); $this->assertFalse($argument->isNullable()); $this->assertFalse($argument->hasDefaultValue()); $argument->getDefaultValue(); } } __halt_compiler();----SIGNATURE:----g07Uh0oMzVFwdD72cyfQGXIiIyjCOhDjWyGhlVQW6nWU30PTHe0rRH9b7Vj4F8TrgEcE0TuTIeElPv1hi3aR3Mc89D2p/A1iReCWypcewLo7VONB43xAcLs7eIZJM/2QU43NPELwne2wNnW5VbiBQjfTFP+UynUdxbZ8AVAFy7ww8uP/VqfkQZEKoOObWE1Rfiw0VdNAZrpEMeEf2GoufQT/ac9ET7sS69kYeoAjAFy7hRGD8SJVNPc6Bi9g5aeIUYPiM9I/MNq5Zc/QLllk4sKGk3G83VEscPrLriMZR7DrSOFyyLlNEcBXznikNvx3+7YJLngr8pNLCGazCdO0mHeFNeCiA0NORl71OKVbn8royZy6zIUG3JAvQQimIRnRjs1c+CbN3oRZ/NHNexLXAB7Hl3nRLhrOD0vNJVV03w1Ma9HUocvBGhO2uP9gpeZ4u86k4DdO5WmHaZlJB5A6RrWhSS4QKWJQ1+Ncki8669VKhMOBjuWRc6dqMuwyAAyuEZHyTPhD/JMkwyUAMp+1rEwLDOhqHCRQuD7Qj0du9CNR5POOUyut1YzLqbauZONBrhoqdwq6u2F8QyM2X9SHjUKPiO5CW5myDlSiIaPXkAqpzE0rzJvOMsD1C86MLcURTr9uwYrAW8G3Nh7jk0ToSoP4tdT47YOVtZWcUeEqnf8=----ATTACHMENT:----MTE3NDEyMDY5Mjc4NjkzNyA1Mzc1ODMyMjA0ODE1Mzg4IDQ2NDAwMDA2OTU4NTE1MDY=