bytic /
router
| 1 | <?php |
||
| 2 | |||
| 3 | namespace Nip\Router\Tests\Parsers; |
||
| 4 | |||
| 5 | use Nip\Router\Parsers\AbstractParser; |
||
| 6 | |||
| 7 | /** |
||
| 8 | * Test class for Nip_Route_Abstract. |
||
| 9 | * Generated by PHPUnit on 2010-11-17 at 15:16:44. |
||
| 10 | */ |
||
| 11 | abstract class AbstractParserTest extends \Nip\Router\Tests\AbstractTest |
||
| 12 | { |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var AbstractParser |
||
| 16 | */ |
||
| 17 | protected $object; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Sets up the fixture, for example, opens a network connection. |
||
| 21 | * This method is called before a test is executed. |
||
| 22 | */ |
||
| 23 | protected function setUp() : void |
||
| 24 | { |
||
| 25 | $this->object = $this->getMockForAbstractClass('AbstractParser'); |
||
|
0 ignored issues
–
show
|
|||
| 26 | } |
||
| 27 | |||
| 28 | |||
| 29 | // public function testSetMap() |
||
| 30 | // { |
||
| 31 | // $map = 'module/test'; |
||
| 32 | // $this->object->setMap($map); |
||
| 33 | // static::assertEquals($map, $this->object->getMap()); |
||
| 34 | // static::assertEquals(2, count($this->object->getParts())); |
||
| 35 | // } |
||
| 36 | // |
||
| 37 | // public function testAssemble() |
||
| 38 | // { |
||
| 39 | // $params = array( |
||
| 40 | // 'url' => 'lorem', |
||
| 41 | // 'name' => 'ipsum', |
||
| 42 | // 'company' => 'dolo&rem', |
||
| 43 | // ); |
||
| 44 | // static::assertEquals('?url=lorem&name=ipsum&company=dolo%26rem', $this->object->assemble($params)); |
||
| 45 | // |
||
| 46 | // $this->object->setMap(':url/:name'); |
||
| 47 | // static::assertEquals('lorem/ipsum?company=dolo%26rem', $this->object->assemble($params)); |
||
| 48 | // } |
||
| 49 | // |
||
| 50 | // public function testStripEmptyParams() |
||
| 51 | // { |
||
| 52 | // $inputArray = [ |
||
| 53 | // '1' => '', |
||
| 54 | // '2' => '3', |
||
| 55 | // '3' => ['123', ''] |
||
| 56 | // ]; |
||
| 57 | // $outputArray = array( |
||
| 58 | // '2' => '3', |
||
| 59 | // '3' => array('123') |
||
| 60 | // ); |
||
| 61 | // |
||
| 62 | // static::assertEquals($outputArray, $this->object->stripEmptyParams($inputArray)); |
||
| 63 | // } |
||
| 64 | } |
||
| 65 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..