init without trunk
This commit is contained in:
parent
ed24ac4994
commit
bb809e7233
14652 changed files with 177862 additions and 94817 deletions
33
vendor/sensio/framework-extra-bundle/Tests/Functional/NullableAnnotationTest.php
vendored
Normal file
33
vendor/sensio/framework-extra-bundle/Tests/Functional/NullableAnnotationTest.php
vendored
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
||||
|
||||
/**
|
||||
* @requires PHP 7.1
|
||||
*/
|
||||
class NullableAnnotationTest extends WebTestCase
|
||||
{
|
||||
public function testMissingRequiredArgumentWillResultWithError()
|
||||
{
|
||||
$client = self::createClient();
|
||||
$client->request('GET', '/nullable-arguments/without-default');
|
||||
|
||||
$this->assertSame(500, $client->getResponse()->getStatusCode());
|
||||
}
|
||||
|
||||
public function testArgumentWithDefaultIsOptional()
|
||||
{
|
||||
$client = self::createClient();
|
||||
$crawler = $client->request('GET', '/nullable-arguments/with-default');
|
||||
|
||||
$this->assertSame('yes', $crawler->text());
|
||||
}
|
||||
|
||||
public function testNullableArgumentIsOptional()
|
||||
{
|
||||
$client = self::createClient();
|
||||
$crawler = $client->request('GET', '/nullable-arguments/nullable');
|
||||
|
||||
$this->assertSame('yes', $crawler->text());
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue