Skip to content

Commit 5f8f2f8

Browse files
committed
Merge pull request #651 from entering/requestparam-annotation-remove-property
RequestParam annotation remove default property
2 parents 7516eee + b27297b commit 5f8f2f8

File tree

2 files changed

+34
-2
lines changed

2 files changed

+34
-2
lines changed

Controller/Annotations/RequestParam.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,4 @@ class RequestParam extends Param
2323
{
2424
/** @var boolean */
2525
public $strict = true;
26-
/** @var string */
27-
public $default = null;
2826
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the FOSRestBundle package.
5+
*
6+
* (c) FriendsOfSymfony <http://friendsofsymfony.github.com/>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespace FOS\RestBundle\Tests\Controller\Annotations;
13+
14+
use FOS\RestBundle\Controller\Annotations\RequestParam;
15+
16+
/**
17+
* RequestParamTest
18+
*
19+
* @author Eduardo Oliveira <[email protected]>
20+
*/
21+
class RequestParamTest extends \PHPUnit_Framework_TestCase
22+
{
23+
public function testDefaultIsNull()
24+
{
25+
$requestParam = new RequestParam();
26+
$this->assertNull($requestParam->default, 'Expected RequestParam default property to be null');
27+
}
28+
29+
public function testStrictIsTrue()
30+
{
31+
$requestParam = new RequestParam();
32+
$this->assertTrue($requestParam->strict, 'Expected RequestParam strict property to be true');
33+
}
34+
}

0 commit comments

Comments
 (0)