| @@ 54-64 (lines=11) @@ | ||
| 51 | $this->header->setParameter($parameter, true); |
|
| 52 | } |
|
| 53 | ||
| 54 | public function testFindParameterByName() |
|
| 55 | { |
|
| 56 | $parameter = new HeaderParameter\Custom('name', 'value'); |
|
| 57 | ||
| 58 | $this->parameters->expects($this->exactly(2)) |
|
| 59 | ->method('getIterator') |
|
| 60 | ->will($this->returnValue(new \ArrayObject([$parameter]))); |
|
| 61 | ||
| 62 | $this->assertSame($parameter, $this->header->findParameterByName('name')); |
|
| 63 | $this->assertNull($this->header->findParameterByName('none')); |
|
| 64 | } |
|
| 65 | ||
| 66 | public function testGetParameters() |
|
| 67 | { |
|
| @@ 36-46 (lines=11) @@ | ||
| 33 | $this->payload->setClaim($claim); |
|
| 34 | } |
|
| 35 | ||
| 36 | public function testFindClaimByName() |
|
| 37 | { |
|
| 38 | $claim = new Claim\PrivateClaim('name', 'value'); |
|
| 39 | ||
| 40 | $this->claims->expects($this->exactly(2)) |
|
| 41 | ->method('getIterator') |
|
| 42 | ->will($this->returnValue(new \ArrayObject([$claim]))); |
|
| 43 | ||
| 44 | $this->assertSame($claim, $this->payload->findClaimByName('name')); |
|
| 45 | $this->assertNull($this->payload->findClaimByName('none')); |
|
| 46 | } |
|
| 47 | ||
| 48 | public function testGetClaims() |
|
| 49 | { |
|