mirror of
https://github.com/barryvdh/ReflectionDocBlock.git
synced 2026-08-18 01:57:13 +00:00
Fix tests
This commit is contained in:
@@ -108,7 +108,7 @@ LONGDESC;
|
|||||||
|
|
||||||
$parsedDescription = $parsedContents[1]->getParsedDescription();
|
$parsedDescription = $parsedContents[1]->getParsedDescription();
|
||||||
$this->assertCount(3, $parsedDescription);
|
$this->assertCount(3, $parsedDescription);
|
||||||
$this->assertSame("inline tag with\n", $parsedDescription[0]);
|
$this->assertSame("inline tag with", trim($parsedDescription[0]));
|
||||||
$this->assertInstanceOf(
|
$this->assertInstanceOf(
|
||||||
__NAMESPACE__ . '\Tag\LinkTag',
|
__NAMESPACE__ . '\Tag\LinkTag',
|
||||||
$parsedDescription[1]
|
$parsedDescription[1]
|
||||||
|
|||||||
@@ -28,12 +28,12 @@ class TagTest extends TestCase
|
|||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @expectedException \InvalidArgumentException
|
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testInvalidTagLine()
|
public function testInvalidTagLine()
|
||||||
{
|
{
|
||||||
|
$this->expectException(\InvalidArgumentException::class);
|
||||||
Tag::createInstance('Invalid tag line');
|
Tag::createInstance('Invalid tag line');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -77,7 +77,7 @@ class TagTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testTagHandlerCorrectRegistration()
|
public function testTagHandlerCorrectRegistration()
|
||||||
{
|
{
|
||||||
if (0 == ini_get('allow_url_include')) {
|
if (!ini_get('allow_url_include')) {
|
||||||
$this->markTestSkipped('"data" URIs for includes are required.');
|
$this->markTestSkipped('"data" URIs for includes are required.');
|
||||||
}
|
}
|
||||||
$currentHandler = __NAMESPACE__ . '\Tag\VarTag';
|
$currentHandler = __NAMESPACE__ . '\Tag\VarTag';
|
||||||
|
|||||||
@@ -146,12 +146,12 @@ class CollectionTest extends TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers Barryvdh\Reflection\DocBlock\Type\Collection::add
|
* @covers Barryvdh\Reflection\DocBlock\Type\Collection::add
|
||||||
* @expectedException InvalidArgumentException
|
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testAddWithInvalidArgument()
|
public function testAddWithInvalidArgument()
|
||||||
{
|
{
|
||||||
|
$this->expectException(\InvalidArgumentException::class);
|
||||||
$collection = new Collection();
|
$collection = new Collection();
|
||||||
$collection->add(array());
|
$collection->add(array());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -166,12 +166,12 @@ DOCBLOCK;
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @expectedException \InvalidArgumentException
|
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testExceptionOnInvalidObject()
|
public function testExceptionOnInvalidObject()
|
||||||
{
|
{
|
||||||
|
$this->expectException(\InvalidArgumentException::class);
|
||||||
new DocBlock($this);
|
new DocBlock($this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -204,8 +204,9 @@ DOCBLOCK;
|
|||||||
*/
|
*/
|
||||||
public function testInvalidTagBlock()
|
public function testInvalidTagBlock()
|
||||||
{
|
{
|
||||||
if (0 == ini_get('allow_url_include')) {
|
if (!ini_get('allow_url_include')) {
|
||||||
$this->markTestSkipped('"data" URIs for includes are required.');
|
$this->markTestSkipped('"data" URIs for includes are required.');
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
include 'data:text/plain;base64,'. base64_encode(
|
include 'data:text/plain;base64,'. base64_encode(
|
||||||
|
|||||||
Reference in New Issue
Block a user