update composer and fix tests and add gitignore

This commit is contained in:
Dennis Eichhorn 2020-07-31 15:44:05 +02:00
parent 57dbbda112
commit 6a7cc29799
6 changed files with 875 additions and 1157 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
vendor

View File

@ -57,7 +57,7 @@ class Comment
* @var int|CommentList
* @since 1.0.0
*/
private int $list = 0;
private $list = 0;
/**
* Title
@ -191,11 +191,11 @@ class Comment
/**
* Get the list this comment belongs to
*
* @return int
* @return int|CommentList
*
* @since 1.0.0
*/
public function getList() : int
public function getList()
{
return $this->list;
}

View File

@ -8,13 +8,11 @@
}
],
"require-dev": {
"phpunit/phpunit": "^8.5",
"phpunit/phpunit": "^9.2",
"squizlabs/php_codesniffer": "^3.5",
"phpmd/phpmd": "^2.6",
"phpstan/phpstan": "^0.12.18",
"phan/phan": "^1.1.5",
"codeclimate/php-test-reporter": "^0.4.4",
"facebook/webdriver": "^1.7",
"friendsofphp/php-cs-fixer": "^2.16.1",
"johnkary/phpunit-speedtrap": "^3.1"
},

2009
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -33,13 +33,13 @@ class CommentListTest extends \PHPUnit\Framework\TestCase
{
$list = new CommentList();
$comment = new Comment();
$comment->setTitle('Test Comment');
$comment->setTitle('Test Title');
$comment->setContentRaw('TestRaw');
$comment->setContent('TestContent');
$comment->setContent('Test Content');
$list->addComment($comment);
self::assertEquals('Test Comment', $list->getComments()[0]->getTitle());
self::assertEquals('Test Comment', $list->getComments()[0]->getContentRaw());
self::assertEquals('Test Comment', $list->getComments()[0]->getcontent());
self::assertEquals('Test Title', $list->getComments()[0]->getTitle());
self::assertEquals('TestRaw', $list->getComments()[0]->getContentRaw());
self::assertEquals('Test Content', $list->getComments()[0]->getcontent());
}
}

View File

@ -43,6 +43,6 @@ class CommentMapperTest extends \PHPUnit\Framework\TestCase
self::assertEquals($comment->getTitle(), $commentR->getTitle());
self::assertEquals($comment->getContent(), $commentR->getContent());
self::assertEquals($comment->getRef(), $commentR->getRef());
self::assertEquals($comment->getList(), $commentR->getList());
self::assertEquals($comment->getList()->getId(), $commentR->getList()->getId());
}
}