add subscription process create endpoint
This commit is contained in:
@ -113,6 +113,31 @@ class SubscriptionProcessTest extends IntegrationTestCase
|
||||
yield 'access denied' => [new Response(403, [], '["API Zugriff verweigert"]'), null, true];
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @return void
|
||||
* @throws ReflectionException
|
||||
* @covers \D3\KlicktippPhpClient\Resources\SubscriptionProcess::create
|
||||
* @dataProvider getDataProvider
|
||||
*/
|
||||
public function testCreate(ResponseInterface $response, ?Subscription $expected, bool $expectException = false)
|
||||
{
|
||||
$sut = new SubscriptionProcess($this->getConnectionMock($response));
|
||||
|
||||
if ($expectException) {
|
||||
$this->expectException(BaseException::class);
|
||||
}
|
||||
|
||||
$this->assertEquals(
|
||||
$expected,
|
||||
$this->callMethod(
|
||||
$sut,
|
||||
'create',
|
||||
['newName']
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @throws ReflectionException
|
||||
|
Reference in New Issue
Block a user