Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimise test framework bunq/sdk_php#120 #121

Merged
merged 11 commits into from
Apr 3, 2018

Conversation

OGKevin
Copy link
Contributor

@OGKevin OGKevin commented Apr 2, 2018

This PR closes/fixes the following issues:

@OGKevin OGKevin added this to the 0.13.5 milestone Apr 2, 2018
@OGKevin OGKevin self-assigned this Apr 2, 2018
@OGKevin OGKevin added this to To do in 1.0.0 - SDK via automation Apr 2, 2018
@OGKevin OGKevin changed the title Optimise test framework bunq/sdk php#120 Optimise test framework bunq/sdk_php#120 Apr 2, 2018
@OGKevin OGKevin moved this from To do to open PR in 1.0.0 - SDK Apr 2, 2018
Copy link
Contributor Author

@OGKevin OGKevin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor changes.

]
);
$avatarUuid = Avatar::create($attachmentUuid->getValue());

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new line can go

@@ -8,6 +8,7 @@
use bunq\Model\Generated\Object\Pointer;
use bunq\test\BunqSdkTestBase;
use bunq\test\Config;
use phpDocumentor\Reflection\Types\This;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can go

@OGKevin OGKevin requested a review from sandervdo April 2, 2018 10:29
@OGKevin
Copy link
Contributor Author

OGKevin commented Apr 2, 2018

@sandervdo please 👀

@bunq bunq deleted a comment Apr 2, 2018
Copy link
Contributor

@sandervdo sandervdo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some small comments @OGKevin

]
);
$avatarUuid = Avatar::create($attachmentUuid->getValue());
$cashId = CashRegister::create(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$cashRegisterId

foreach ($allAlias as $alias) {
if ($alias->getType() === self::POINTER_TYPE_IBAN) {
return $alias;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explicit else

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In open-source project explicit else is not needed. Only in bunq internal projects.

*/
protected static function createApiContext(): ApiContext
protected function getUserBravoPointer(): Pointer
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getPointerUserBravo

/**
* @return bool
*/
protected function doesAccountHaveEnoughMoney(): bool
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isMonetaryAccountBalanceSufficient

{
if (!$this->doesAccountHaveEnoughMoney()) {
static::markTestSkipped(self::WARMING_TEST_SKIPPED_DUE_TO_INSUFFICIENT_BALANCE);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explicit else

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In open-source project explicit else is not needed. Only in bunq internal projects.

{
$this->assertTestShouldBeSkippedDueToInsufficientBalance();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Naming seems weird. Asserting the test should be skipped?

/**
* Tests the creation of a tab.
*
* This test and all its dependants have no assertion as of its testing to see if the code runs without errors.
*/
public function testCreateTab()
{
if (BunqContext::getUserContext()->isOnlyUserPersonSet()) {
static::markTestSkipped('Only user company can create tabs.');
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

explicit else

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In open-source project explicit else is not needed. Only in bunq internal projects.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack, man, this switching between style guides... 😅

@bunq bunq deleted a comment Apr 3, 2018
@OGKevin
Copy link
Contributor Author

OGKevin commented Apr 3, 2018

@sandervdo please 👀 again.

@bunq bunq deleted a comment Apr 3, 2018
@bunq bunq deleted a comment Apr 3, 2018
@OGKevin
Copy link
Contributor Author

OGKevin commented Apr 3, 2018

@andrederoos

@OGKevin OGKevin merged commit de3ba20 into develop Apr 3, 2018
1.0.0 - SDK automation moved this from open PR to merged Apr 3, 2018
@OGKevin OGKevin deleted the optimise_test_framework_bunq/sdk_php#120 branch April 3, 2018 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
1.0.0 - SDK
  
merged
Development

Successfully merging this pull request may close these issues.

Fix/Optimise test framework for CI. PHP unit needs to be updated to version 6
2 participants