| @@ 55-65 (lines=11) @@ | ||
| 52 | /** |
|
| 53 | * Test handlerMethodNameForObject method. |
|
| 54 | */ |
|
| 55 | public function testMethodNameForObject() |
|
| 56 | { |
|
| 57 | $this |
|
| 58 | ->given($exception = NotFoundException::handlerMethodNameForObject('bar')) |
|
| 59 | ->then() |
|
| 60 | ->variable($exception->getPrevious()) |
|
| 61 | ->isNull() |
|
| 62 | ->integer($exception->getCode()) |
|
| 63 | ->isEqualTo(3) |
|
| 64 | ; |
|
| 65 | } |
|
| 66 | ||
| 67 | /** |
|
| 68 | * Test handlerFor method. |
|
| @@ 70-80 (lines=11) @@ | ||
| 67 | /** |
|
| 68 | * Test handlerFor method. |
|
| 69 | */ |
|
| 70 | public function testHandlerFor() |
|
| 71 | { |
|
| 72 | $this |
|
| 73 | ->given($exception = NotFoundException::handlerFor('bar')) |
|
| 74 | ->then() |
|
| 75 | ->variable($exception->getPrevious()) |
|
| 76 | ->isNull() |
|
| 77 | ->integer($exception->getCode()) |
|
| 78 | ->isEqualTo(5) |
|
| 79 | ; |
|
| 80 | } |
|
| 81 | ||
| 82 | /** |
|
| 83 | * Test middlewareOfType method. |
|
| @@ 85-95 (lines=11) @@ | ||
| 82 | /** |
|
| 83 | * Test middlewareOfType method. |
|
| 84 | */ |
|
| 85 | public function testMiddlewareOfType() |
|
| 86 | { |
|
| 87 | $this |
|
| 88 | ->given($exception = NotFoundException::middlewareOfType('bar')) |
|
| 89 | ->then() |
|
| 90 | ->variable($exception->getPrevious()) |
|
| 91 | ->isNull() |
|
| 92 | ->integer($exception->getCode()) |
|
| 93 | ->isEqualTo(6) |
|
| 94 | ; |
|
| 95 | } |
|
| 96 | ||
| 97 | /** |
|
| 98 | * Test nameOfCommand method. |
|
| @@ 100-110 (lines=11) @@ | ||
| 97 | /** |
|
| 98 | * Test nameOfCommand method. |
|
| 99 | */ |
|
| 100 | public function testNameOfCommand() |
|
| 101 | { |
|
| 102 | $this |
|
| 103 | ->given($exception = NotFoundException::nameOfCommand('bar')) |
|
| 104 | ->then() |
|
| 105 | ->variable($exception->getPrevious()) |
|
| 106 | ->isNull() |
|
| 107 | ->integer($exception->getCode()) |
|
| 108 | ->isEqualTo(2) |
|
| 109 | ; |
|
| 110 | } |
|
| 111 | ||
| 112 | /** |
|
| 113 | * Test nameOfQuery method. |
|
| @@ 115-125 (lines=11) @@ | ||
| 112 | /** |
|
| 113 | * Test nameOfQuery method. |
|
| 114 | */ |
|
| 115 | public function testNameOfQuery() |
|
| 116 | { |
|
| 117 | $this |
|
| 118 | ->given($exception = NotFoundException::nameOfQuery('bar')) |
|
| 119 | ->then() |
|
| 120 | ->variable($exception->getPrevious()) |
|
| 121 | ->isNull() |
|
| 122 | ->integer($exception->getCode()) |
|
| 123 | ->isEqualTo(4) |
|
| 124 | ; |
|
| 125 | } |
|
| 126 | ||
| 127 | /** |
|
| 128 | * Test methodForObject method. |
|
| @@ 130-140 (lines=11) @@ | ||
| 127 | /** |
|
| 128 | * Test methodForObject method. |
|
| 129 | */ |
|
| 130 | public function testMethodForObject() |
|
| 131 | { |
|
| 132 | $this |
|
| 133 | ->given($exception = NotFoundException::methodForObject('foo', 'bar')) |
|
| 134 | ->then() |
|
| 135 | ->variable($exception->getPrevious()) |
|
| 136 | ->isNull() |
|
| 137 | ->integer($exception->getCode()) |
|
| 138 | ->isEqualTo(7) |
|
| 139 | ; |
|
| 140 | } |
|
| 141 | } |
|
| 142 | ||