| Conditions | 1 |
| Paths | 1 |
| Total Lines | 20 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 46 | public function testCommandDocWithDescription() |
||
| 47 | { |
||
| 48 | $object = new \SwaggerGen\Swagger\Tag($this->parent, 'Name'); |
||
| 49 | |||
| 50 | $this->assertInstanceOf('\SwaggerGen\Swagger\Tag', $object); |
||
| 51 | |||
| 52 | $this->assertSame(array( |
||
| 53 | 'name' => 'Name', |
||
| 54 | ), $object->toArray()); |
||
| 55 | |||
| 56 | $object->handleCommand('doc', 'http://example.test Some words here'); |
||
| 57 | |||
| 58 | $this->assertSame(array( |
||
| 59 | 'name' => 'Name', |
||
| 60 | 'externalDocs' => array( |
||
| 61 | 'url' => 'http://example.test', |
||
| 62 | 'description' => 'Some words here', |
||
| 63 | ), |
||
| 64 | ), $object->toArray()); |
||
| 65 | } |
||
| 66 | |||
| 68 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.