Changed test names with more reasonable ones

These names helps understand purpose of the tests. Also --testdox-html option of phpunit generates more logical results that way.
This commit is contained in:
Yusuf Kandemir 2018-11-12 19:23:35 +03:00
parent a5bfeb5ec5
commit b5377c04c5
2 changed files with 6 additions and 6 deletions

View File

@ -24,7 +24,7 @@ class MicrodataParserTest extends \PHPUnit\Framework\TestCase
/**
* @dataProvider data
*/
public function testToObject($data)
public function testItConvertsMicrodataToObjectFormat($data)
{
$parser = $this->getParser($data);
@ -36,7 +36,7 @@ class MicrodataParserTest extends \PHPUnit\Framework\TestCase
/**
* @dataProvider data
*/
public function testToArray($data)
public function testItConvertsMicrodataToArrayFormat($data)
{
$parser = $this->getParser($data);
@ -48,7 +48,7 @@ class MicrodataParserTest extends \PHPUnit\Framework\TestCase
/**
* @dataProvider data
*/
public function testToJSON($data)
public function testItConvertsMicrodataToJsonFormat($data)
{
$parser = $this->getParser($data);

View File

@ -9,7 +9,7 @@ class MicrodataTest extends \PHPUnit\Framework\TestCase
{
protected $htmlFileName = __DIR__ . '/data/W3C/source.html';
public function testFromHTML()
public function testItCreatesMicrodataParserFromHtml()
{
$html = file_get_contents($this->htmlFileName);
$microdata = Microdata::fromHTML($html);
@ -17,14 +17,14 @@ class MicrodataTest extends \PHPUnit\Framework\TestCase
$this->assertInstanceOf(MicrodataParser::class, $microdata);
}
public function testFromHTMLFile()
public function testItCreatesMicrodataParserFromHtmlFile()
{
$microdata = Microdata::fromHTMLFile($this->htmlFileName);
$this->assertInstanceOf(MicrodataParser::class, $microdata);
}
public function testFromDOMDocument()
public function testItCreatesMicrodataParserFromDomDocument()
{
$dom = new \DOMDocument;
$dom->loadHTMLFile($this->htmlFileName);