for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Lichtenwallner (https://lichtenwallner.at)
*
* @see https://github.com/jolicht/markdown-cms for the canonical source repository
* @license https://github.com/jolicht/markdown-cms/blob/master/LICENSE MIT
* @copyright Copyright (c) Johannes Lichtenwallner
*/
declare(strict_types = 1);
namespace JolichtTest\MarkdownCms\Markdown;
use PHPUnit\Framework\TestCase;
use Jolicht\MarkdownCms\Markdown\MarkdownDocument;
class MarkdownDocumentTest extends TestCase
{
private $document, $params;
Only declaring a single property per statement allows you to later on add doc comments more easily.
It is also recommended by PSR2, so it is a common style that many people expect.
protected function setUp()
$this->params = [
'id' => 'testId'
];
$this->document = new MarkdownDocument($this->params, 'testContent');
}
public function testGetParams()
$this->assertSame($this->params, $this->document->getParams());
public function testGetContent()
$this->assertSame('testContent', $this->document->getContent());
Only declaring a single property per statement allows you to later on add doc comments more easily.
It is also recommended by PSR2, so it is a common style that many people expect.