Tests are now compliant with php-cs-fixer (CamelCase for method, phpdoc valid)

This commit is contained in:
2023-04-13 22:22:46 +02:00
parent b017700d0a
commit 273db5f183
51 changed files with 3926 additions and 3637 deletions

View File

@@ -1,29 +1,32 @@
<?php
/** DomFramework - Tests
* @package domframework
* @author Dominique Fournier <dominique@fournier38.fr>
* @license BSD
*/
/**
* DomFramework - Tests
* @package domframework
* @author Dominique Fournier <dominique@fournier38.fr>
* @license BSD
*/
namespace Domframework\Tests;
use Domframework\Rss;
/** Test the RSS */
/**
* Test the RSS
*/
class RssTest extends \PHPUnit_Framework_TestCase
{
public function test_empty0()
public function testEmpty0()
{
// Empty
// Empty
$this->expectException("Exception", "No title is provided for this RSS");
$rss = new Rss();
$res = $rss->asXML();
}
public function test_functional1()
public function testFunctional1()
{
// Functionnal 1
// Functionnal 1
$rss = new Rss();
$rss->title("Global Title")
->link("http://localhost")
@@ -60,9 +63,9 @@ class RssTest extends \PHPUnit_Framework_TestCase
");
}
public function test_error1()
public function testError1()
{
// Missing global description
// Missing global description
$this->expectException(
"Exception",
"No description is provided for this RSS"
@@ -74,9 +77,9 @@ class RssTest extends \PHPUnit_Framework_TestCase
$res = $rss->asXML();
}
public function test_error2()
public function testError2()
{
// Missing global link
// Missing global link
$this->expectException("Exception", "No link is provided for this RSS");
$rss = new Rss();
$rss->title("Global Title")
@@ -85,9 +88,9 @@ class RssTest extends \PHPUnit_Framework_TestCase
$res = $rss->asXML();
}
public function test_error3()
public function testError3()
{
// Missing global title
// Missing global title
$this->expectException("Exception", "No title is provided for this RSS");
$rss = new Rss();
$rss->link("http://localhost")
@@ -96,9 +99,9 @@ class RssTest extends \PHPUnit_Framework_TestCase
$res = $rss->asXML();
}
public function test_error4()
public function testError4()
{
// Invalid date provided
// Invalid date provided
$this->expectException(
"Exception",
"lastBuildDate provided to RSS is not a valid date"
@@ -112,9 +115,9 @@ class RssTest extends \PHPUnit_Framework_TestCase
$res = $rss->asXML();
}
public function test_itemError1()
public function testItemError1()
{
// Empty Item provided
// Empty Item provided
$this->expectException(
"Exception",
"No title nor description defined in the RSS item"
@@ -129,9 +132,9 @@ class RssTest extends \PHPUnit_Framework_TestCase
$res = $rss->asXML();
}
public function test_itemError2()
public function testItemError2()
{
// Item without Title and Description
// Item without Title and Description
$this->expectException(
"Exception",
"No title nor description defined in the RSS item"
@@ -146,9 +149,9 @@ class RssTest extends \PHPUnit_Framework_TestCase
$res = $rss->asXML();
}
public function test_itemError3()
public function testItemError3()
{
// Item with invalid date
// Item with invalid date
$this->expectException(
"Exception",
"pubDate provided to RSS Item is not a valid date"