for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
class AbstractDocumentableObjectTest extends SwaggerGen_TestCase
You can fix this by adding a namespace to your class:
namespace YourVendor; class YourClass { }
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.
{
protected $parent;
protected function setUp()
$this->parent = $this->getMockForAbstractClass('\SwaggerGen\Swagger\AbstractObject');
}
protected function assertPreConditions()
$this->assertInstanceOf('\SwaggerGen\Swagger\AbstractObject', $this->parent);
/**
* @covers \SwaggerGen\Swagger\Tag::__construct
* @covers \SwaggerGen\Swagger\AbstractDocumentableObject->handleCommand
*/
public function testCommandDocWithoutDescription()
$object = new \SwaggerGen\Swagger\Tag($this->parent, 'Name');
$this->assertInstanceOf('\SwaggerGen\Swagger\Tag', $object);
$this->assertSame(array(
'name' => 'Name',
), $object->toArray());
$object->handleCommand('doc', 'http://example.test');
'externalDocs' => array(
'url' => 'http://example.test',
),
public function testCommandDocWithDescription()
$object->handleCommand('doc', 'http://example.test Some words here');
'description' => 'Some words here',
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.