reformat code
This commit is contained in:
parent
19338d2a58
commit
3911584ea7
@ -19,7 +19,7 @@ EOF;
|
|||||||
|
|
||||||
$config = new PhpCsFixer\Config();
|
$config = new PhpCsFixer\Config();
|
||||||
return $config->setRules([
|
return $config->setRules([
|
||||||
'@PHP80Migration' => true,
|
'@PHP80Migration:risky' => true,
|
||||||
'@PSR12' => true,
|
'@PSR12' => true,
|
||||||
'header_comment' => [
|
'header_comment' => [
|
||||||
'comment_type' => 'PHPDoc',
|
'comment_type' => 'PHPDoc',
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "./vendor/bin/phpunit --no-coverage",
|
"test": "./vendor/bin/phpunit --no-coverage",
|
||||||
"check-style": "./vendor/bin/php-cs-fixer fix --verbose --dry-run",
|
"check-style": "./vendor/bin/php-cs-fixer fix --verbose --dry-run",
|
||||||
"fix-style": "./vendor/bin/php-cs-fixer fix --verbose",
|
"fix-style": "./vendor/bin/php-cs-fixer fix --verbose --allow-risky=yes",
|
||||||
"check-code": "./vendor/bin/phpstan analyse -c phpstan.neon --no-progress --ansi"
|
"check-code": "./vendor/bin/phpstan analyse -c phpstan.neon --no-progress --ansi"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
* @link https://www.oxidmodule.com
|
* @link https://www.oxidmodule.com
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace D3\KlicktippPhpClient\Entities;
|
namespace D3\KlicktippPhpClient\Entities;
|
||||||
|
|
||||||
use D3\KlicktippPhpClient\Exceptions\BaseException;
|
use D3\KlicktippPhpClient\Exceptions\BaseException;
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
* @link https://www.oxidmodule.com
|
* @link https://www.oxidmodule.com
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace D3\KlicktippPhpClient\Entities;
|
namespace D3\KlicktippPhpClient\Entities;
|
||||||
|
|
||||||
use D3\KlicktippPhpClient\Exceptions\BaseException;
|
use D3\KlicktippPhpClient\Exceptions\BaseException;
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
* @link https://www.oxidmodule.com
|
* @link https://www.oxidmodule.com
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace D3\KlicktippPhpClient\Entities;
|
namespace D3\KlicktippPhpClient\Entities;
|
||||||
|
|
||||||
use Doctrine\Common\Collections\ArrayCollection;
|
use Doctrine\Common\Collections\ArrayCollection;
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
* @link https://www.oxidmodule.com
|
* @link https://www.oxidmodule.com
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace D3\KlicktippPhpClient\Entities;
|
namespace D3\KlicktippPhpClient\Entities;
|
||||||
|
|
||||||
use D3\KlicktippPhpClient\Exceptions\BaseException;
|
use D3\KlicktippPhpClient\Exceptions\BaseException;
|
||||||
@ -158,9 +160,7 @@ class Subscriber extends ArrayCollection
|
|||||||
public function getFields(): ArrayCollection
|
public function getFields(): ArrayCollection
|
||||||
{
|
{
|
||||||
return $this->filter(
|
return $this->filter(
|
||||||
function ($value, $key) {
|
fn ($value, $key) => str_starts_with($key, 'field')
|
||||||
return str_starts_with($key, 'field');
|
|
||||||
}
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
* @link https://www.oxidmodule.com
|
* @link https://www.oxidmodule.com
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace D3\KlicktippPhpClient\Entities;
|
namespace D3\KlicktippPhpClient\Entities;
|
||||||
|
|
||||||
use Doctrine\Common\Collections\ArrayCollection;
|
use Doctrine\Common\Collections\ArrayCollection;
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
* @link https://www.oxidmodule.com
|
* @link https://www.oxidmodule.com
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace D3\KlicktippPhpClient\Entities;
|
namespace D3\KlicktippPhpClient\Entities;
|
||||||
|
|
||||||
use D3\KlicktippPhpClient\Exceptions\BaseException;
|
use D3\KlicktippPhpClient\Exceptions\BaseException;
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
* @link https://www.oxidmodule.com
|
* @link https://www.oxidmodule.com
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace D3\KlicktippPhpClient\Entities;
|
namespace D3\KlicktippPhpClient\Entities;
|
||||||
|
|
||||||
use Doctrine\Common\Collections\ArrayCollection;
|
use Doctrine\Common\Collections\ArrayCollection;
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
* @link https://www.oxidmodule.com
|
* @link https://www.oxidmodule.com
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace D3\KlicktippPhpClient\Entities;
|
namespace D3\KlicktippPhpClient\Entities;
|
||||||
|
|
||||||
use D3\KlicktippPhpClient\Exceptions\BaseException;
|
use D3\KlicktippPhpClient\Exceptions\BaseException;
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
* @link https://www.oxidmodule.com
|
* @link https://www.oxidmodule.com
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace D3\KlicktippPhpClient\Entities;
|
namespace D3\KlicktippPhpClient\Entities;
|
||||||
|
|
||||||
use Doctrine\Common\Collections\ArrayCollection;
|
use Doctrine\Common\Collections\ArrayCollection;
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
* @link https://www.oxidmodule.com
|
* @link https://www.oxidmodule.com
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace D3\KlicktippPhpClient\Exceptions;
|
namespace D3\KlicktippPhpClient\Exceptions;
|
||||||
|
|
||||||
use Exception;
|
use Exception;
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
* @link https://www.oxidmodule.com
|
* @link https://www.oxidmodule.com
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace D3\KlicktippPhpClient\Exceptions;
|
namespace D3\KlicktippPhpClient\Exceptions;
|
||||||
|
|
||||||
class NoCredentialsException extends BaseException
|
class NoCredentialsException extends BaseException
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
* @link https://www.oxidmodule.com
|
* @link https://www.oxidmodule.com
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace D3\KlicktippPhpClient\Resources;
|
namespace D3\KlicktippPhpClient\Resources;
|
||||||
|
|
||||||
use D3\KlicktippPhpClient\Entities\Account as AccountEntity;
|
use D3\KlicktippPhpClient\Entities\Account as AccountEntity;
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
* @link https://www.oxidmodule.com
|
* @link https://www.oxidmodule.com
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace D3\KlicktippPhpClient\Resources;
|
namespace D3\KlicktippPhpClient\Resources;
|
||||||
|
|
||||||
use D3\KlicktippPhpClient\Entities\Field as FieldEntity;
|
use D3\KlicktippPhpClient\Entities\Field as FieldEntity;
|
||||||
@ -63,7 +65,7 @@ class Field extends Model
|
|||||||
*/
|
*/
|
||||||
public function create(string $name): string
|
public function create(string $name): string
|
||||||
{
|
{
|
||||||
return current(
|
return (string) current(
|
||||||
$this->connection->requestAndParse(
|
$this->connection->requestAndParse(
|
||||||
'POST',
|
'POST',
|
||||||
'field.json',
|
'field.json',
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
* @link https://www.oxidmodule.com
|
* @link https://www.oxidmodule.com
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace D3\KlicktippPhpClient\Resources;
|
namespace D3\KlicktippPhpClient\Resources;
|
||||||
|
|
||||||
use D3\KlicktippPhpClient\Connection;
|
use D3\KlicktippPhpClient\Connection;
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
* @link https://www.oxidmodule.com
|
* @link https://www.oxidmodule.com
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace D3\KlicktippPhpClient\Resources;
|
namespace D3\KlicktippPhpClient\Resources;
|
||||||
|
|
||||||
use D3\KlicktippPhpClient\Entities\Subscriber as SubscriberEntity;
|
use D3\KlicktippPhpClient\Entities\Subscriber as SubscriberEntity;
|
||||||
@ -111,7 +113,7 @@ class Subscriber extends Model
|
|||||||
*/
|
*/
|
||||||
public function search(string $mailAddress): string
|
public function search(string $mailAddress): string
|
||||||
{
|
{
|
||||||
return current(
|
return (string) current(
|
||||||
$this->connection->requestAndParse(
|
$this->connection->requestAndParse(
|
||||||
'POST',
|
'POST',
|
||||||
'subscriber/search.json',
|
'subscriber/search.json',
|
||||||
@ -328,9 +330,9 @@ class Subscriber extends Model
|
|||||||
/**
|
/**
|
||||||
* @throws BaseException
|
* @throws BaseException
|
||||||
*/
|
*/
|
||||||
public function signoff(string $apikey, string $emailAddress): string
|
public function signoff(string $apikey, string $emailAddress): bool
|
||||||
{
|
{
|
||||||
return current(
|
return (bool) current(
|
||||||
$this->connection->requestAndParse(
|
$this->connection->requestAndParse(
|
||||||
'POST',
|
'POST',
|
||||||
'subscriber/signoff.json',
|
'subscriber/signoff.json',
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
* @link https://www.oxidmodule.com
|
* @link https://www.oxidmodule.com
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace D3\KlicktippPhpClient\Resources;
|
namespace D3\KlicktippPhpClient\Resources;
|
||||||
|
|
||||||
use D3\KlicktippPhpClient\Entities\Subscription as SubscriptionEntity;
|
use D3\KlicktippPhpClient\Entities\Subscription as SubscriptionEntity;
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
* @link https://www.oxidmodule.com
|
* @link https://www.oxidmodule.com
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace D3\KlicktippPhpClient\Resources;
|
namespace D3\KlicktippPhpClient\Resources;
|
||||||
|
|
||||||
use D3\KlicktippPhpClient\Entities\Tag as TagEntity;
|
use D3\KlicktippPhpClient\Entities\Tag as TagEntity;
|
||||||
@ -64,7 +66,7 @@ class Tag extends Model
|
|||||||
*/
|
*/
|
||||||
public function create(string $name): string
|
public function create(string $name): string
|
||||||
{
|
{
|
||||||
return current(
|
return (string) current(
|
||||||
$this->connection->requestAndParse(
|
$this->connection->requestAndParse(
|
||||||
'POST',
|
'POST',
|
||||||
'tag.json',
|
'tag.json',
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
* @link https://www.oxidmodule.com
|
* @link https://www.oxidmodule.com
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace D3\KlicktippPhpClient\tests\integration;
|
namespace D3\KlicktippPhpClient\tests\integration;
|
||||||
|
|
||||||
use D3\KlicktippPhpClient\Connection;
|
use D3\KlicktippPhpClient\Connection;
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
* @link https://www.oxidmodule.com
|
* @link https://www.oxidmodule.com
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace D3\KlicktippPhpClient\tests\integration\Resources;
|
namespace D3\KlicktippPhpClient\tests\integration\Resources;
|
||||||
|
|
||||||
use D3\KlicktippPhpClient\Entities\Account as AccountEntity;
|
use D3\KlicktippPhpClient\Entities\Account as AccountEntity;
|
||||||
@ -139,7 +141,7 @@ class AccountTest extends IntegrationTestCase
|
|||||||
* @covers \D3\KlicktippPhpClient\Resources\Account::getEntity
|
* @covers \D3\KlicktippPhpClient\Resources\Account::getEntity
|
||||||
* @dataProvider getDataProvider
|
* @dataProvider getDataProvider
|
||||||
*/
|
*/
|
||||||
public function testGet(ResponseInterface $response, ?array $expected, bool $expectException = false)
|
public function testGet(ResponseInterface $response, ?array $expected, bool $expectException = false): void
|
||||||
{
|
{
|
||||||
$sut = new Account($this->getConnectionMock($response));
|
$sut = new Account($this->getConnectionMock($response));
|
||||||
|
|
||||||
@ -180,7 +182,7 @@ class AccountTest extends IntegrationTestCase
|
|||||||
* @covers \D3\KlicktippPhpClient\Resources\Account::update
|
* @covers \D3\KlicktippPhpClient\Resources\Account::update
|
||||||
* @dataProvider updateDataProvider
|
* @dataProvider updateDataProvider
|
||||||
*/
|
*/
|
||||||
public function testUpdate(ResponseInterface $response, ?bool $expected, bool $expectException = false)
|
public function testUpdate(ResponseInterface $response, ?bool $expected, bool $expectException = false): void
|
||||||
{
|
{
|
||||||
$sut = new Account($this->getConnectionMock($response));
|
$sut = new Account($this->getConnectionMock($response));
|
||||||
|
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
* @link https://www.oxidmodule.com
|
* @link https://www.oxidmodule.com
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace D3\KlicktippPhpClient\tests\integration\Resources;
|
namespace D3\KlicktippPhpClient\tests\integration\Resources;
|
||||||
|
|
||||||
use D3\KlicktippPhpClient\Entities\Field as FieldEntity;
|
use D3\KlicktippPhpClient\Entities\Field as FieldEntity;
|
||||||
@ -37,7 +39,7 @@ class FieldTest extends IntegrationTestCase
|
|||||||
* @covers \D3\KlicktippPhpClient\Resources\Field::index
|
* @covers \D3\KlicktippPhpClient\Resources\Field::index
|
||||||
* @dataProvider indexDataProvider
|
* @dataProvider indexDataProvider
|
||||||
*/
|
*/
|
||||||
public function testIndex(ResponseInterface $response, ?FieldList $expected, bool $expectException = false)
|
public function testIndex(ResponseInterface $response, ?FieldList $expected, bool $expectException = false): void
|
||||||
{
|
{
|
||||||
$sut = new Field($this->getConnectionMock($response));
|
$sut = new Field($this->getConnectionMock($response));
|
||||||
|
|
||||||
@ -102,7 +104,7 @@ class FieldTest extends IntegrationTestCase
|
|||||||
* @covers \D3\KlicktippPhpClient\Resources\Field::getEntity
|
* @covers \D3\KlicktippPhpClient\Resources\Field::getEntity
|
||||||
* @dataProvider getDataProvider
|
* @dataProvider getDataProvider
|
||||||
*/
|
*/
|
||||||
public function testGet(ResponseInterface $response, ?array $expected, bool $expectException = false)
|
public function testGet(ResponseInterface $response, ?array $expected, bool $expectException = false): void
|
||||||
{
|
{
|
||||||
$sut = new Field($this->getConnectionMock($response));
|
$sut = new Field($this->getConnectionMock($response));
|
||||||
|
|
||||||
@ -139,7 +141,7 @@ class FieldTest extends IntegrationTestCase
|
|||||||
* @covers \D3\KlicktippPhpClient\Resources\Field::create
|
* @covers \D3\KlicktippPhpClient\Resources\Field::create
|
||||||
* @dataProvider createDataProvider
|
* @dataProvider createDataProvider
|
||||||
*/
|
*/
|
||||||
public function testCreate(ResponseInterface $response, ?string $expected, bool $expectException = false)
|
public function testCreate(ResponseInterface $response, ?string $expected, bool $expectException = false): void
|
||||||
{
|
{
|
||||||
$sut = new Field($this->getConnectionMock($response));
|
$sut = new Field($this->getConnectionMock($response));
|
||||||
|
|
||||||
@ -170,7 +172,7 @@ class FieldTest extends IntegrationTestCase
|
|||||||
* @covers \D3\KlicktippPhpClient\Resources\Field::update
|
* @covers \D3\KlicktippPhpClient\Resources\Field::update
|
||||||
* @dataProvider updateDataProvider
|
* @dataProvider updateDataProvider
|
||||||
*/
|
*/
|
||||||
public function testUpdate(ResponseInterface $response, ?bool $expected, bool $expectException = false)
|
public function testUpdate(ResponseInterface $response, ?bool $expected, bool $expectException = false): void
|
||||||
{
|
{
|
||||||
$sut = new Field($this->getConnectionMock($response));
|
$sut = new Field($this->getConnectionMock($response));
|
||||||
|
|
||||||
@ -201,7 +203,7 @@ class FieldTest extends IntegrationTestCase
|
|||||||
* @covers \D3\KlicktippPhpClient\Resources\Field::delete
|
* @covers \D3\KlicktippPhpClient\Resources\Field::delete
|
||||||
* @dataProvider deleteDataProvider
|
* @dataProvider deleteDataProvider
|
||||||
*/
|
*/
|
||||||
public function testDelete(ResponseInterface $response, ?bool $expected, bool $expectException = false)
|
public function testDelete(ResponseInterface $response, ?bool $expected, bool $expectException = false): void
|
||||||
{
|
{
|
||||||
$sut = new Field($this->getConnectionMock($response));
|
$sut = new Field($this->getConnectionMock($response));
|
||||||
|
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
* @link https://www.oxidmodule.com
|
* @link https://www.oxidmodule.com
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace D3\KlicktippPhpClient\tests\integration\Resources;
|
namespace D3\KlicktippPhpClient\tests\integration\Resources;
|
||||||
|
|
||||||
use D3\KlicktippPhpClient\Entities\Subscriber as SubscriberEntity;
|
use D3\KlicktippPhpClient\Entities\Subscriber as SubscriberEntity;
|
||||||
@ -54,7 +56,7 @@ class SubscriberTest extends IntegrationTestCase
|
|||||||
* @covers \D3\KlicktippPhpClient\Resources\Subscriber::index
|
* @covers \D3\KlicktippPhpClient\Resources\Subscriber::index
|
||||||
* @dataProvider indexDataProvider
|
* @dataProvider indexDataProvider
|
||||||
*/
|
*/
|
||||||
public function testIndex(ResponseInterface $response, ?SubscriberList $expected, bool $expectException = false)
|
public function testIndex(ResponseInterface $response, ?SubscriberList $expected, bool $expectException = false): void
|
||||||
{
|
{
|
||||||
$sut = new Subscriber($this->getConnectionMock($response));
|
$sut = new Subscriber($this->getConnectionMock($response));
|
||||||
|
|
||||||
@ -96,7 +98,7 @@ class SubscriberTest extends IntegrationTestCase
|
|||||||
* @covers \D3\KlicktippPhpClient\Resources\Subscriber::getEntity
|
* @covers \D3\KlicktippPhpClient\Resources\Subscriber::getEntity
|
||||||
* @dataProvider getDataProvider
|
* @dataProvider getDataProvider
|
||||||
*/
|
*/
|
||||||
public function testGet(ResponseInterface $response, ?array $expected, bool $expectException = false)
|
public function testGet(ResponseInterface $response, ?array $expected, bool $expectException = false): void
|
||||||
{
|
{
|
||||||
$sut = new Subscriber($this->getConnectionMock($response));
|
$sut = new Subscriber($this->getConnectionMock($response));
|
||||||
|
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
* @link https://www.oxidmodule.com
|
* @link https://www.oxidmodule.com
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace D3\KlicktippPhpClient\tests\integration\Resources;
|
namespace D3\KlicktippPhpClient\tests\integration\Resources;
|
||||||
|
|
||||||
use D3\KlicktippPhpClient\Entities\Subscription;
|
use D3\KlicktippPhpClient\Entities\Subscription;
|
||||||
@ -36,7 +38,7 @@ class SubscriptionProcessTest extends IntegrationTestCase
|
|||||||
* @covers \D3\KlicktippPhpClient\Resources\SubscriptionProcess::index
|
* @covers \D3\KlicktippPhpClient\Resources\SubscriptionProcess::index
|
||||||
* @dataProvider indexDataProvider
|
* @dataProvider indexDataProvider
|
||||||
*/
|
*/
|
||||||
public function testIndex(ResponseInterface $response, ?SubscriptionList $expected, bool $expectException = false)
|
public function testIndex(ResponseInterface $response, ?SubscriptionList $expected, bool $expectException = false): void
|
||||||
{
|
{
|
||||||
$sut = new SubscriptionProcess($this->getConnectionMock($response));
|
$sut = new SubscriptionProcess($this->getConnectionMock($response));
|
||||||
|
|
||||||
@ -73,7 +75,7 @@ class SubscriptionProcessTest extends IntegrationTestCase
|
|||||||
* @covers \D3\KlicktippPhpClient\Resources\SubscriptionProcess::getEntity
|
* @covers \D3\KlicktippPhpClient\Resources\SubscriptionProcess::getEntity
|
||||||
* @dataProvider getDataProvider
|
* @dataProvider getDataProvider
|
||||||
*/
|
*/
|
||||||
public function testGet(ResponseInterface $response, ?array $expected, bool $expectException = false)
|
public function testGet(ResponseInterface $response, ?array $expected, bool $expectException = false): void
|
||||||
{
|
{
|
||||||
$sut = new SubscriptionProcess($this->getConnectionMock($response));
|
$sut = new SubscriptionProcess($this->getConnectionMock($response));
|
||||||
|
|
||||||
@ -121,7 +123,7 @@ class SubscriptionProcessTest extends IntegrationTestCase
|
|||||||
* @covers \D3\KlicktippPhpClient\Resources\SubscriptionProcess::create
|
* @covers \D3\KlicktippPhpClient\Resources\SubscriptionProcess::create
|
||||||
* @dataProvider getDataProvider
|
* @dataProvider getDataProvider
|
||||||
*/
|
*/
|
||||||
public function testCreate(ResponseInterface $response, ?array $expected, bool $expectException = false)
|
public function testCreate(ResponseInterface $response, ?array $expected, bool $expectException = false): void
|
||||||
{
|
{
|
||||||
$sut = new SubscriptionProcess($this->getConnectionMock($response));
|
$sut = new SubscriptionProcess($this->getConnectionMock($response));
|
||||||
|
|
||||||
@ -145,7 +147,7 @@ class SubscriptionProcessTest extends IntegrationTestCase
|
|||||||
* @covers \D3\KlicktippPhpClient\Resources\SubscriptionProcess::update
|
* @covers \D3\KlicktippPhpClient\Resources\SubscriptionProcess::update
|
||||||
* @dataProvider updateDataProvider
|
* @dataProvider updateDataProvider
|
||||||
*/
|
*/
|
||||||
public function testUpdate(ResponseInterface $response, ?bool $expected, bool $expectException = false)
|
public function testUpdate(ResponseInterface $response, ?bool $expected, bool $expectException = false): void
|
||||||
{
|
{
|
||||||
$sut = new SubscriptionProcess($this->getConnectionMock($response));
|
$sut = new SubscriptionProcess($this->getConnectionMock($response));
|
||||||
|
|
||||||
@ -176,7 +178,7 @@ class SubscriptionProcessTest extends IntegrationTestCase
|
|||||||
* @covers \D3\KlicktippPhpClient\Resources\SubscriptionProcess::redirect
|
* @covers \D3\KlicktippPhpClient\Resources\SubscriptionProcess::redirect
|
||||||
* @dataProvider redirectDataProvider
|
* @dataProvider redirectDataProvider
|
||||||
*/
|
*/
|
||||||
public function testRedirect(ResponseInterface $response, ?string $expected, bool $expectException = false)
|
public function testRedirect(ResponseInterface $response, ?string $expected, bool $expectException = false): void
|
||||||
{
|
{
|
||||||
$sut = new SubscriptionProcess($this->getConnectionMock($response));
|
$sut = new SubscriptionProcess($this->getConnectionMock($response));
|
||||||
|
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
* @link https://www.oxidmodule.com
|
* @link https://www.oxidmodule.com
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace D3\KlicktippPhpClient\tests\integration\Resources;
|
namespace D3\KlicktippPhpClient\tests\integration\Resources;
|
||||||
|
|
||||||
use D3\KlicktippPhpClient\Entities\Tag as TagEntity;
|
use D3\KlicktippPhpClient\Entities\Tag as TagEntity;
|
||||||
@ -36,7 +38,7 @@ class TagTest extends IntegrationTestCase
|
|||||||
* @covers \D3\KlicktippPhpClient\Resources\Tag::index
|
* @covers \D3\KlicktippPhpClient\Resources\Tag::index
|
||||||
* @dataProvider indexDataProvider
|
* @dataProvider indexDataProvider
|
||||||
*/
|
*/
|
||||||
public function testIndex(ResponseInterface $response, ?TagList $expected, bool $expectException = false)
|
public function testIndex(ResponseInterface $response, ?TagList $expected, bool $expectException = false): void
|
||||||
{
|
{
|
||||||
$sut = new Tag($this->getConnectionMock($response));
|
$sut = new Tag($this->getConnectionMock($response));
|
||||||
|
|
||||||
@ -73,7 +75,7 @@ class TagTest extends IntegrationTestCase
|
|||||||
* @covers \D3\KlicktippPhpClient\Resources\Tag::getEntity
|
* @covers \D3\KlicktippPhpClient\Resources\Tag::getEntity
|
||||||
* @dataProvider getDataProvider
|
* @dataProvider getDataProvider
|
||||||
*/
|
*/
|
||||||
public function testGet(ResponseInterface $response, ?array $expected, bool $expectException = false)
|
public function testGet(ResponseInterface $response, ?array $expected, bool $expectException = false): void
|
||||||
{
|
{
|
||||||
$sut = new Tag($this->getConnectionMock($response));
|
$sut = new Tag($this->getConnectionMock($response));
|
||||||
|
|
||||||
@ -112,7 +114,7 @@ class TagTest extends IntegrationTestCase
|
|||||||
* @covers \D3\KlicktippPhpClient\Resources\Tag::create
|
* @covers \D3\KlicktippPhpClient\Resources\Tag::create
|
||||||
* @dataProvider createDataProvider
|
* @dataProvider createDataProvider
|
||||||
*/
|
*/
|
||||||
public function testCreate(ResponseInterface $response, ?string $expected, bool $expectException = false)
|
public function testCreate(ResponseInterface $response, ?string $expected, bool $expectException = false): void
|
||||||
{
|
{
|
||||||
$sut = new Tag($this->getConnectionMock($response));
|
$sut = new Tag($this->getConnectionMock($response));
|
||||||
|
|
||||||
@ -143,7 +145,7 @@ class TagTest extends IntegrationTestCase
|
|||||||
* @covers \D3\KlicktippPhpClient\Resources\Tag::update
|
* @covers \D3\KlicktippPhpClient\Resources\Tag::update
|
||||||
* @dataProvider updateDataProvider
|
* @dataProvider updateDataProvider
|
||||||
*/
|
*/
|
||||||
public function testUpdate(ResponseInterface $response, ?bool $expected, bool $expectException = false)
|
public function testUpdate(ResponseInterface $response, ?bool $expected, bool $expectException = false): void
|
||||||
{
|
{
|
||||||
$sut = new Tag($this->getConnectionMock($response));
|
$sut = new Tag($this->getConnectionMock($response));
|
||||||
|
|
||||||
@ -174,7 +176,7 @@ class TagTest extends IntegrationTestCase
|
|||||||
* @covers \D3\KlicktippPhpClient\Resources\Tag::delete
|
* @covers \D3\KlicktippPhpClient\Resources\Tag::delete
|
||||||
* @dataProvider deleteDataProvider
|
* @dataProvider deleteDataProvider
|
||||||
*/
|
*/
|
||||||
public function testDelete(ResponseInterface $response, ?bool $expected, bool $expectException = false)
|
public function testDelete(ResponseInterface $response, ?bool $expected, bool $expectException = false): void
|
||||||
{
|
{
|
||||||
$sut = new Tag($this->getConnectionMock($response));
|
$sut = new Tag($this->getConnectionMock($response));
|
||||||
|
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
* @link https://www.oxidmodule.com
|
* @link https://www.oxidmodule.com
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace D3\KlicktippPhpClient\tests\unit\Entities;
|
namespace D3\KlicktippPhpClient\tests\unit\Entities;
|
||||||
|
|
||||||
use D3\KlicktippPhpClient\Entities\Account;
|
use D3\KlicktippPhpClient\Entities\Account;
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
* @link https://www.oxidmodule.com
|
* @link https://www.oxidmodule.com
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace D3\KlicktippPhpClient\tests\unit\Entities;
|
namespace D3\KlicktippPhpClient\tests\unit\Entities;
|
||||||
|
|
||||||
use D3\KlicktippPhpClient\Entities\Field;
|
use D3\KlicktippPhpClient\Entities\Field;
|
||||||
@ -73,7 +75,7 @@ class FieldTest extends TestCase
|
|||||||
* @covers \D3\KlicktippPhpClient\Entities\Field::getName
|
* @covers \D3\KlicktippPhpClient\Entities\Field::getName
|
||||||
* @dataProvider getSomethingDataProvider
|
* @dataProvider getSomethingDataProvider
|
||||||
*/
|
*/
|
||||||
public function testGetSomething(string $methodName, string $expectedValue)
|
public function testGetSomething(string $methodName, string $expectedValue): void
|
||||||
{
|
{
|
||||||
$this->assertSame(
|
$this->assertSame(
|
||||||
$expectedValue,
|
$expectedValue,
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
* @link https://www.oxidmodule.com
|
* @link https://www.oxidmodule.com
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace D3\KlicktippPhpClient\tests\unit\Entities;
|
namespace D3\KlicktippPhpClient\tests\unit\Entities;
|
||||||
|
|
||||||
use D3\KlicktippPhpClient\Entities\Subscriber;
|
use D3\KlicktippPhpClient\Entities\Subscriber;
|
||||||
@ -169,7 +171,7 @@ class SubscriberTest extends TestCase
|
|||||||
* @covers \D3\KlicktippPhpClient\Entities\Subscriber::getSmsReferrer
|
* @covers \D3\KlicktippPhpClient\Entities\Subscriber::getSmsReferrer
|
||||||
* @dataProvider getSomethingDataProvider
|
* @dataProvider getSomethingDataProvider
|
||||||
*/
|
*/
|
||||||
public function testGetSomething(string $methodName, string $expectedValue)
|
public function testGetSomething(string $methodName, string $expectedValue): void
|
||||||
{
|
{
|
||||||
$this->assertSame(
|
$this->assertSame(
|
||||||
$expectedValue,
|
$expectedValue,
|
||||||
@ -371,7 +373,7 @@ class SubscriberTest extends TestCase
|
|||||||
* @throws ReflectionException
|
* @throws ReflectionException
|
||||||
* @covers \D3\KlicktippPhpClient\Entities\Subscriber::getFields
|
* @covers \D3\KlicktippPhpClient\Entities\Subscriber::getFields
|
||||||
*/
|
*/
|
||||||
public function testGetFields()
|
public function testGetFields(): void
|
||||||
{
|
{
|
||||||
$fields = $this->callMethod(
|
$fields = $this->callMethod(
|
||||||
$this->entity,
|
$this->entity,
|
||||||
@ -466,7 +468,7 @@ class SubscriberTest extends TestCase
|
|||||||
* @covers \D3\KlicktippPhpClient\Entities\Subscriber::getOutbounds
|
* @covers \D3\KlicktippPhpClient\Entities\Subscriber::getOutbounds
|
||||||
* @dataProvider getTagsDataProvider
|
* @dataProvider getTagsDataProvider
|
||||||
*/
|
*/
|
||||||
public function testGetTags(string $methodName, int $expectedCount)
|
public function testGetTags(string $methodName, int $expectedCount): void
|
||||||
{
|
{
|
||||||
$tags = $this->callMethod(
|
$tags = $this->callMethod(
|
||||||
$this->entity,
|
$this->entity,
|
||||||
@ -497,7 +499,7 @@ class SubscriberTest extends TestCase
|
|||||||
* @covers \D3\KlicktippPhpClient\Entities\Subscriber::isTagSet
|
* @covers \D3\KlicktippPhpClient\Entities\Subscriber::isTagSet
|
||||||
* @dataProvider isTagSetDataProvider
|
* @dataProvider isTagSetDataProvider
|
||||||
*/
|
*/
|
||||||
public function testIsTagSet(string $searchTagId, bool $expected)
|
public function testIsTagSet(string $searchTagId, bool $expected): void
|
||||||
{
|
{
|
||||||
$tagList = new ArrayCollection([
|
$tagList = new ArrayCollection([
|
||||||
"12494453",
|
"12494453",
|
||||||
@ -628,7 +630,7 @@ class SubscriberTest extends TestCase
|
|||||||
?array $newTagList,
|
?array $newTagList,
|
||||||
InvokedCount $removeTagInvocation,
|
InvokedCount $removeTagInvocation,
|
||||||
InvokedCount $setTagInvocation
|
InvokedCount $setTagInvocation
|
||||||
) {
|
): void {
|
||||||
$entityMock = $this->getMockBuilder(Subscriber::class)
|
$entityMock = $this->getMockBuilder(Subscriber::class)
|
||||||
->disableOriginalConstructor()
|
->disableOriginalConstructor()
|
||||||
->onlyMethods(['getTags'])
|
->onlyMethods(['getTags'])
|
||||||
@ -671,7 +673,7 @@ class SubscriberTest extends TestCase
|
|||||||
* @covers \D3\KlicktippPhpClient\Entities\Subscriber::isManualTagSet
|
* @covers \D3\KlicktippPhpClient\Entities\Subscriber::isManualTagSet
|
||||||
* @dataProvider isManualTagSetDataProvider
|
* @dataProvider isManualTagSetDataProvider
|
||||||
*/
|
*/
|
||||||
public function testIsManualTagSet(string $searchTagId, bool $expected)
|
public function testIsManualTagSet(string $searchTagId, bool $expected): void
|
||||||
{
|
{
|
||||||
$this->assertSame(
|
$this->assertSame(
|
||||||
$expected,
|
$expected,
|
||||||
@ -698,7 +700,7 @@ class SubscriberTest extends TestCase
|
|||||||
* @covers \D3\KlicktippPhpClient\Entities\Subscriber::getFinishedCampaignTime
|
* @covers \D3\KlicktippPhpClient\Entities\Subscriber::getFinishedCampaignTime
|
||||||
* @dataProvider getTagDataProvider
|
* @dataProvider getTagDataProvider
|
||||||
*/
|
*/
|
||||||
public function testGetTag(string $testMethodName, string $invokedMethodName)
|
public function testGetTag(string $testMethodName, string $invokedMethodName): void
|
||||||
{
|
{
|
||||||
$fixtureDate = '2024-12-24 18:00:00';
|
$fixtureDate = '2024-12-24 18:00:00';
|
||||||
$fixture = new DateTime($fixtureDate);
|
$fixture = new DateTime($fixtureDate);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user