Fix tests

This commit is contained in:
Barry vd. Heuvel
2022-10-31 16:20:50 +01:00
parent 6eafab0ff3
commit ad1e63e15c
4 changed files with 9 additions and 8 deletions
@@ -108,7 +108,7 @@ LONGDESC;
$parsedDescription = $parsedContents[1]->getParsedDescription();
$this->assertCount(3, $parsedDescription);
$this->assertSame("inline tag with\n", $parsedDescription[0]);
$this->assertSame("inline tag with", trim($parsedDescription[0]));
$this->assertInstanceOf(
__NAMESPACE__ . '\Tag\LinkTag',
$parsedDescription[1]
@@ -28,12 +28,12 @@ class TagTest extends TestCase
{
/**
* @expectedException \InvalidArgumentException
*
*
* @return void
*/
public function testInvalidTagLine()
{
$this->expectException(\InvalidArgumentException::class);
Tag::createInstance('Invalid tag line');
}
@@ -77,7 +77,7 @@ class TagTest extends TestCase
*/
public function testTagHandlerCorrectRegistration()
{
if (0 == ini_get('allow_url_include')) {
if (!ini_get('allow_url_include')) {
$this->markTestSkipped('"data" URIs for includes are required.');
}
$currentHandler = __NAMESPACE__ . '\Tag\VarTag';
@@ -146,12 +146,12 @@ class CollectionTest extends TestCase
/**
* @covers Barryvdh\Reflection\DocBlock\Type\Collection::add
* @expectedException InvalidArgumentException
*
* @return void
*/
public function testAddWithInvalidArgument()
{
$this->expectException(\InvalidArgumentException::class);
$collection = new Collection();
$collection->add(array());
}
+4 -3
View File
@@ -166,12 +166,12 @@ DOCBLOCK;
}
/**
* @expectedException \InvalidArgumentException
*
*
* @return void
*/
public function testExceptionOnInvalidObject()
{
$this->expectException(\InvalidArgumentException::class);
new DocBlock($this);
}
@@ -204,8 +204,9 @@ DOCBLOCK;
*/
public function testInvalidTagBlock()
{
if (0 == ini_get('allow_url_include')) {
if (!ini_get('allow_url_include')) {
$this->markTestSkipped('"data" URIs for includes are required.');
return;
}
include 'data:text/plain;base64,'. base64_encode(