mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-08 17:12:25 +03:00
Updated phpunit tests for phpunit v7
This commit is contained in:
parent
9e9565400d
commit
a1ae0f3746
15 changed files with 66 additions and 37 deletions
|
@ -13,9 +13,10 @@
|
|||
|
||||
namespace EA\Engine\Api\V1;
|
||||
|
||||
use \EA\Engine\Types\NonEmptyText;
|
||||
use EA\Engine\Type\NonEmptyText;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class AuthorizationTest extends \PHPUnit_Framework_TestCase {
|
||||
class AuthorizationTest extends TestCase {
|
||||
public function testBasicMethodPerformsBasicAuthentication()
|
||||
{
|
||||
$this->markTestIncomplete();
|
||||
|
|
|
@ -13,7 +13,9 @@
|
|||
|
||||
namespace EA\Engine\Api\V1;
|
||||
|
||||
class FilterTest extends \PHPUnit_Framework_TestCase {
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class FilterTest extends TestCase {
|
||||
public function test()
|
||||
{
|
||||
$this->markTestIncomplete();
|
||||
|
|
|
@ -13,7 +13,9 @@
|
|||
|
||||
namespace EA\Engine\Api\V1;
|
||||
|
||||
class MinimizeTest extends \PHPUnit_Framework_TestCase {
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class MinimizeTest extends TestCase {
|
||||
public function test()
|
||||
{
|
||||
$this->markTestIncomplete();
|
||||
|
|
|
@ -13,7 +13,9 @@
|
|||
|
||||
namespace EA\Engine\Api\V1;
|
||||
|
||||
class PaginationTest extends \PHPUnit_Framework_TestCase {
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class PaginationTest extends TestCase {
|
||||
public function test()
|
||||
{
|
||||
$this->markTestIncomplete();
|
||||
|
|
|
@ -13,7 +13,9 @@
|
|||
|
||||
namespace EA\Engine\Api\V1;
|
||||
|
||||
class ResponseTest extends \PHPUnit_Framework_TestCase {
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class ResponseTest extends TestCase {
|
||||
public function test()
|
||||
{
|
||||
$this->markTestIncomplete();
|
||||
|
|
|
@ -13,7 +13,9 @@
|
|||
|
||||
namespace EA\Engine\Api\V1;
|
||||
|
||||
class SearchTest extends \PHPUnit_Framework_TestCase {
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class SearchTest extends TestCase {
|
||||
public function test()
|
||||
{
|
||||
$this->markTestIncomplete();
|
||||
|
|
|
@ -13,7 +13,9 @@
|
|||
|
||||
namespace EA\Engine\Api\V1;
|
||||
|
||||
class SortTest extends \PHPUnit_Framework_TestCase {
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class SortTest extends TestCase {
|
||||
public function test()
|
||||
{
|
||||
$this->markTestIncomplete();
|
||||
|
|
|
@ -11,9 +11,11 @@
|
|||
* @since v1.2.0
|
||||
* ---------------------------------------------------------------------------- */
|
||||
|
||||
namespace EA\Engine\Types;
|
||||
namespace EA\Engine\Type;
|
||||
|
||||
class BooleanTest extends \PHPUnit_Framework_TestCase {
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class BooleanTest extends TestCase {
|
||||
public function testBoolType()
|
||||
{
|
||||
$type = new Boolean(TRUE);
|
||||
|
@ -22,7 +24,7 @@ class BooleanTest extends \PHPUnit_Framework_TestCase {
|
|||
|
||||
public function testBoolTypeThrowsExceptionWithInvalidValue()
|
||||
{
|
||||
$this->setExpectedException('\InvalidArgumentException');
|
||||
$this->expectException(\InvalidArgumentException::class);
|
||||
new Boolean(NULL);
|
||||
}
|
||||
}
|
|
@ -11,9 +11,11 @@
|
|||
* @since v1.2.0
|
||||
* ---------------------------------------------------------------------------- */
|
||||
|
||||
namespace EA\Engine\Types;
|
||||
namespace EA\Engine\Type;
|
||||
|
||||
class DecimalTest extends \PHPUnit_Framework_TestCase {
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class DecimalTest extends TestCase {
|
||||
public function testFloatType()
|
||||
{
|
||||
$type = new Decimal(100.00);
|
||||
|
@ -22,7 +24,7 @@ class DecimalTest extends \PHPUnit_Framework_TestCase {
|
|||
|
||||
public function testFloatTypeThrowsExceptionWithInvalidValue()
|
||||
{
|
||||
$this->setExpectedException('\InvalidArgumentException');
|
||||
$this->expectException(\InvalidArgumentException::class);
|
||||
new Decimal(NULL);
|
||||
}
|
||||
}
|
|
@ -11,9 +11,11 @@
|
|||
* @since v1.2.0
|
||||
* ---------------------------------------------------------------------------- */
|
||||
|
||||
namespace EA\Engine\Types;
|
||||
namespace EA\Engine\Type;
|
||||
|
||||
class EmailTest extends \PHPUnit_Framework_TestCase {
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class EmailTest extends TestCase {
|
||||
public function testEmailType()
|
||||
{
|
||||
$type = new Email('john@doe.com');
|
||||
|
@ -22,13 +24,13 @@ class EmailTest extends \PHPUnit_Framework_TestCase {
|
|||
|
||||
public function testEmailTypeThrowsExceptionWithInvalidEmail()
|
||||
{
|
||||
$this->setExpectedException('\InvalidArgumentException');
|
||||
$this->expectException(\InvalidArgumentException::class);
|
||||
new Email('abcdef');
|
||||
}
|
||||
|
||||
public function testEmailTypeThrowsExceptionWithInvalidValue()
|
||||
{
|
||||
$this->setExpectedException('\InvalidArgumentException');
|
||||
$this->expectException(\InvalidArgumentException::class);
|
||||
new Email(NULL);
|
||||
}
|
||||
}
|
|
@ -11,9 +11,11 @@
|
|||
* @since v1.2.0
|
||||
* ---------------------------------------------------------------------------- */
|
||||
|
||||
namespace EA\Engine\Types;
|
||||
namespace EA\Engine\Type;
|
||||
|
||||
class IntegerTest extends \PHPUnit_Framework_TestCase {
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class IntegerTest extends TestCase {
|
||||
public function testIntType()
|
||||
{
|
||||
$type = new Integer(1);
|
||||
|
@ -22,13 +24,13 @@ class IntegerTest extends \PHPUnit_Framework_TestCase {
|
|||
|
||||
public function testIntTypeThrowsExceptionWithFloat()
|
||||
{
|
||||
$this->setExpectedException('\InvalidArgumentException');
|
||||
$this->expectException(\InvalidArgumentException::class);
|
||||
new Integer(100.00);
|
||||
}
|
||||
|
||||
public function testIntTypeThrowsExceptionWithWithString()
|
||||
{
|
||||
$this->setExpectedException('\InvalidArgumentException');
|
||||
$this->expectException(\InvalidArgumentException::class);
|
||||
new Integer('invalid');
|
||||
}
|
||||
}
|
|
@ -11,9 +11,11 @@
|
|||
* @since v1.2.0
|
||||
* ---------------------------------------------------------------------------- */
|
||||
|
||||
namespace EA\Engine\Types;
|
||||
namespace EA\Engine\Type;
|
||||
|
||||
class NonEmptyAlphanumericTest extends \PHPUnit_Framework_TestCase {
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class NonEmptyTextTest extends TestCase {
|
||||
public function testNonEmptyStringType()
|
||||
{
|
||||
$type = new NonEmptyText('Hello!');
|
||||
|
@ -22,13 +24,13 @@ class NonEmptyAlphanumericTest extends \PHPUnit_Framework_TestCase {
|
|||
|
||||
public function testNonEmptyStringTypeThrowsExceptionWithEmptyString()
|
||||
{
|
||||
$this->setExpectedException('\InvalidArgumentException');
|
||||
$this->expectException(\InvalidArgumentException::class);
|
||||
new NonEmptyText('');
|
||||
}
|
||||
|
||||
public function testNonEmptyStringTypeThrowsExceptionWithInvalidValue()
|
||||
{
|
||||
$this->setExpectedException('\InvalidArgumentException');
|
||||
$this->expectException(\InvalidArgumentException::class);
|
||||
new NonEmptyText(NULL);
|
||||
}
|
||||
}
|
|
@ -11,9 +11,11 @@
|
|||
* @since v1.2.0
|
||||
* ---------------------------------------------------------------------------- */
|
||||
|
||||
namespace EA\Engine\Types;
|
||||
namespace EA\Engine\Type;
|
||||
|
||||
class TextTest extends \PHPUnit_Framework_TestCase {
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class TextTest extends TestCase {
|
||||
public function testStringType()
|
||||
{
|
||||
$type = new Text('Hello!');
|
||||
|
@ -22,7 +24,7 @@ class TextTest extends \PHPUnit_Framework_TestCase {
|
|||
|
||||
public function testStringTypeThrowsExceptionWithInvalidValue()
|
||||
{
|
||||
$this->setExpectedException('\InvalidArgumentException');
|
||||
$this->expectException(\InvalidArgumentException::class);
|
||||
new Text(NULL);
|
||||
}
|
||||
}
|
|
@ -11,9 +11,11 @@
|
|||
* @since v1.2.0
|
||||
* ---------------------------------------------------------------------------- */
|
||||
|
||||
namespace EA\Engine\Types;
|
||||
namespace EA\Engine\Type;
|
||||
|
||||
class UnsignedIntegerTest extends \PHPUnit_Framework_TestCase {
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class UnsignedIntegerTest extends TestCase {
|
||||
public function testUnsignedIntType()
|
||||
{
|
||||
$type = new UnsignedInteger(1);
|
||||
|
@ -22,13 +24,13 @@ class UnsignedIntegerTest extends \PHPUnit_Framework_TestCase {
|
|||
|
||||
public function testUnsignedIntTypeThrowsExceptionWithNegative()
|
||||
{
|
||||
$this->setExpectedException('\InvalidArgumentException');
|
||||
$this->expectException(\InvalidArgumentException::class);
|
||||
new UnsignedInteger(-1);
|
||||
}
|
||||
|
||||
public function testUnsignedIntTypeThrowsExceptionWithWithString()
|
||||
{
|
||||
$this->setExpectedException('\InvalidArgumentException');
|
||||
$this->expectException(\InvalidArgumentException::class);
|
||||
new UnsignedInteger('invalid');
|
||||
}
|
||||
}
|
|
@ -11,9 +11,11 @@
|
|||
* @since v1.2.0
|
||||
* ---------------------------------------------------------------------------- */
|
||||
|
||||
namespace EA\Engine\Types;
|
||||
namespace EA\Engine\Type;
|
||||
|
||||
class UrlTest extends \PHPUnit_Framework_TestCase {
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class UrlTest extends TestCase {
|
||||
public function testUrlType()
|
||||
{
|
||||
$type = new Url('http://localhost');
|
||||
|
@ -22,13 +24,13 @@ class UrlTest extends \PHPUnit_Framework_TestCase {
|
|||
|
||||
public function testUrlTypeThrowsExceptionWithInvalidUrl()
|
||||
{
|
||||
$this->setExpectedException('\InvalidArgumentException');
|
||||
$this->expectException(\InvalidArgumentException::class);
|
||||
new Url('abcdef');
|
||||
}
|
||||
|
||||
public function testUrlTypeThrowsExceptionWithInvalidValue()
|
||||
{
|
||||
$this->setExpectedException('\InvalidArgumentException');
|
||||
$this->expectException(\InvalidArgumentException::class);
|
||||
new Url(NULL);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue