Skip to content

Commit

Permalink
Updated test case
Browse files Browse the repository at this point in the history
  • Loading branch information
shishir-intelli committed Feb 12, 2024
1 parent 4a39adc commit d5925dc
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 10 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@
"*": "dist"
},
"allow-plugins": {
"php-http/discovery": true
"php-http/discovery": true,
"cweagans/composer-patches": true
}
},
"minimum-stability": "dev",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@

namespace Apigee\Edge\Tests\Api\ApigeeX\Controller;

use Apigee\Edge\Api\ApigeeX\Entity\AppGroup;
use Apigee\Edge\Api\Management\Controller\AppCredentialControllerInterface;
use Apigee\Edge\Api\Management\Entity\AppCredentialInterface;
use Apigee\Edge\Api\Management\Entity\AppInterface;
use Apigee\Edge\Api\Management\Entity\AppOwnerInterface;
use Apigee\Edge\Structure\CredentialProductInterface;
use Apigee\Edge\Tests\Api\Management\Entity\ApiProductTestEntityProviderTrait;
use Apigee\Edge\Tests\Test\Controller\DefaultAPIClientAwareTrait;
Expand Down Expand Up @@ -330,9 +330,9 @@ public function testDelete(): void
$this->assertFalse($found, 'Credential credential has not been deleted.');
}

abstract protected static function setupTestApp(AppOwnerInterface $appOwner): AppInterface;
abstract protected static function setupTestApp(AppGroup $appOwner): AppInterface;

abstract protected static function setupTestAppOwner(): AppOwnerInterface;
abstract protected static function setupTestAppOwner(): AppGroup;

/**
* @return \Apigee\Edge\Tests\Test\Controller\EntityControllerTesterInterface|\Apigee\Edge\Api\Management\Controller\AppByOwnerControllerInterface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
namespace Apigee\Edge\Tests\Api\ApigeeX\Controller;

use Apigee\Edge\Api\ApigeeX\Controller\AppGroupAppCredentialController;
use Apigee\Edge\Api\ApigeeX\Entity\AppGroup;
use Apigee\Edge\Api\ApigeeX\Entity\AppGroupInterface;
use Apigee\Edge\Api\Management\Entity\AppInterface;
use Apigee\Edge\Api\Management\Entity\AppOwnerInterface;
use Apigee\Edge\ClientInterface;
use Apigee\Edge\Entity\EntityInterface;
use Apigee\Edge\Tests\Api\ApigeeX\Entity\AppGroupAppTestEntityProviderTrait;
Expand Down Expand Up @@ -54,15 +54,15 @@ protected static function entityController(ClientInterface $client = null): Enti
return new EntityControllerTester(new AppGroupAppCredentialController(static::defaultTestOrganization($client), static::$testAppOwner->id(), static::$testApp->id(), $client));
}

protected static function setupTestApp(AppOwnerInterface $appOwner): AppInterface
protected static function setupTestApp(AppGroup $appOwner): AppInterface
{
$app = static::getNewAppGroupApp();
static::appGroupAppController()->create($app);

return $app;
}

protected static function setupTestAppOwner(): AppOwnerInterface
protected static function setupTestAppOwner(): AppGroup
{
$appGroup = static::getNewAppGroup();
static::appGroupController()->create($appGroup);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"apps": [],
"channelUri": "http:\/\/example.com",
"channelId": "devportal",
"name": "phpunit",
"displayName": "A PHPUnit appgroup",
"status": "active",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"apps": [],
"channelUri": "http:\/\/example.com",
"channelId": "devportal",
"name": "phpunit",
"displayName": "(Edited) A PHPUnit appgroup",
"status": "active",
Expand All @@ -21,4 +22,4 @@
"createdBy": "[email protected]",
"lastModifiedAt": 1691588699000,
"lastModifiedBy": "[email protected]"
}
}

0 comments on commit d5925dc

Please sign in to comment.