Skip to content

Commit

Permalink
[apigee#65] Adding back createdBy and lastModifiedBy to tests and moc…
Browse files Browse the repository at this point in the history
…k data.
arlina-espinoza committed Oct 25, 2019
1 parent 33c4cd6 commit 17c0651
Showing 39 changed files with 160 additions and 26 deletions.
2 changes: 2 additions & 0 deletions tests/Api/Management/Controller/DeveloperControllerTest.php
Original file line number Diff line number Diff line change
@@ -98,6 +98,8 @@ public function testGetDeveloperByApp(): void
$developer = (object) [
'createdAt' => time() * 1000,
'lastModifiedAt' => time() * 1000,
'createdBy' => 'phpunit@example.com',
'lastModifiedBy' => 'phpunit@example.com',
'name' => 'phpunit',
'firstName' => 'phpunit',
'lastName' => 'phpunit',
Original file line number Diff line number Diff line change
@@ -52,5 +52,7 @@ public function testLoad(): void
$this->assertEquals('trial', $entity->getType());
$this->assertEquals(new \DateTimeImmutable('@648345600'), $entity->getCreatedAt());
$this->assertEquals(new \DateTimeImmutable('@648345600'), $entity->getLastModifiedAt());
$this->assertEquals('phpunit@example.com', $entity->getCreatedBy());
$this->assertEquals('phpunit@example.com', $entity->getLastModifiedBy());
}
}
2 changes: 2 additions & 0 deletions tests/Controller/PaginationHelperTraitTest.php
Original file line number Diff line number Diff line change
@@ -156,6 +156,8 @@ protected function getOrgLoadResponsePayload(bool $cpsEnabled = true): string
$org = [
'createdAt' => time() * 1000,
'lastModifiedAt' => time() * 1000,
'createdBy' => 'phpunit@example.com',
'lastModifiedBy' => 'phpunit@example.com',
'displayName' => 'phpunit',
'name' => 'phpunit',
'environments' => [],
2 changes: 2 additions & 0 deletions tests/offline-test-data/v1/organizations/phpunit/GET.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
{
"createdAt": 648345600000,
"createdBy": "phpunit@example.com",
"displayName": "PHPUnit",
"environments": [
"prod",
"test"
],
"lastModifiedAt": 648345600000,
"lastModifiedBy": "phpunit@example.com",
"name": "phpunit",
"properties": {
"property": [
Original file line number Diff line number Diff line change
@@ -10,10 +10,12 @@
}
],
"createdAt": 648345600000,
"createdBy": "phpunit@example.com",
"description": "",
"displayName": "PHP Unit Test product",
"environments": [],
"lastModifiedAt": 648345600000,
"lastModifiedBy": "phpunit@example.com",
"name": "3phpunit_test",
"proxies": [],
"quota": "10",
@@ -34,10 +36,12 @@
}
],
"createdAt": 648345600000,
"createdBy": "phpunit@example.com",
"description": "",
"displayName": "PHP Unit Test product",
"environments": [],
"lastModifiedAt": 648345600000,
"lastModifiedBy": "phpunit@example.com",
"name": "4phpunit_test",
"proxies": [],
"quota": "10",
Original file line number Diff line number Diff line change
@@ -10,10 +10,12 @@
}
],
"createdAt": 648345600000,
"createdBy": "phpunit@example.com",
"description": "",
"displayName": "PHP Unit Test product",
"environments": [],
"lastModifiedAt": 648345600000,
"lastModifiedBy": "phpunit@example.com",
"name": "4phpunit_test",
"proxies": [],
"quota": "10",
@@ -34,10 +36,12 @@
}
],
"createdAt": 648345600000,
"createdBy": "phpunit@example.com",
"description": "",
"displayName": "PHP Unit Test product",
"environments": [],
"lastModifiedAt": 648345600000,
"lastModifiedBy": "phpunit@example.com",
"name": "5phpunit_test",
"proxies": [],
"quota": "10",
Original file line number Diff line number Diff line change
@@ -10,10 +10,12 @@
}
],
"createdAt": 648345600000,
"createdBy": "phpunit@example.com",
"description": "",
"displayName": "PHP Unit Test product",
"environments": [],
"lastModifiedAt": 648345600000,
"lastModifiedBy": "phpunit@example.com",
"name": "5phpunit_test",
"proxies": [],
"quota": "10",
Original file line number Diff line number Diff line change
@@ -10,10 +10,12 @@
}
],
"createdAt": 648345600000,
"createdBy": "phpunit@example.com",
"description": "",
"displayName": "PHP Unit Test product",
"environments": [],
"lastModifiedAt": 648345600000,
"lastModifiedBy": "phpunit@example.com",
"name": "phpunit_test",
"proxies": [],
"quota": "10",
@@ -34,10 +36,12 @@
}
],
"createdAt": 648345600000,
"createdBy": "phpunit@example.com",
"description": "",
"displayName": "PHP Unit Test product",
"environments": [],
"lastModifiedAt": 648345600000,
"lastModifiedBy": "phpunit@example.com",
"name": "1phpunit_test",
"proxies": [],
"quota": "10",
@@ -58,10 +62,12 @@
}
],
"createdAt": 648345600000,
"createdBy": "phpunit@example.com",
"description": "",
"displayName": "PHP Unit Test product",
"environments": [],
"lastModifiedAt": 648345600000,
"lastModifiedBy": "phpunit@example.com",
"name": "2phpunit_test",
"proxies": [],
"quota": "10",
@@ -82,10 +88,12 @@
}
],
"createdAt": 648345600000,
"createdBy": "phpunit@example.com",
"description": "",
"displayName": "PHP Unit Test product",
"environments": [],
"lastModifiedAt": 648345600000,
"lastModifiedBy": "phpunit@example.com",
"name": "3phpunit_test",
"proxies": [],
"quota": "10",
@@ -106,10 +114,12 @@
}
],
"createdAt": 648345600000,
"createdBy": "phpunit@example.com",
"description": "",
"displayName": "PHP Unit Test product",
"environments": [],
"lastModifiedAt": 648345600000,
"lastModifiedBy": "phpunit@example.com",
"name": "4phpunit_test",
"proxies": [],
"quota": "10",
Original file line number Diff line number Diff line change
@@ -8,9 +8,11 @@
}
],
"createdAt": 648345600000,
"createdBy": "phpunit@example.com",
"displayName": "PHP Unit Test product",
"environments": [],
"lastModifiedAt": 648345600000,
"lastModifiedBy": "phpunit@example.com",
"name": "phpunit_test",
"proxies": [],
"quota": "10",
Original file line number Diff line number Diff line change
@@ -8,9 +8,11 @@
}
],
"createdAt": 648345600000,
"createdBy": "phpunit@example.com",
"displayName": "PHP Unit Test product",
"environments": [],
"lastModifiedAt": 648345600000,
"lastModifiedBy": "phpunit@example.com",
"name": "phpunit_test",
"proxies": [],
"quota": "10",
Original file line number Diff line number Diff line change
@@ -12,9 +12,11 @@
}
],
"createdAt": 648345600000,
"createdBy": "phpunit@example.com",
"displayName": "(Edited) PHP Unit Test product",
"environments": [],
"lastModifiedAt": 648345600000,
"lastModifiedBy": "phpunit@example.com",
"name": "phpunit_test",
"proxies": [],
"quota": "1000",
Original file line number Diff line number Diff line change
@@ -16,6 +16,7 @@
],
"callbackUrl": "http://example.com",
"createdAt": 648345600000,
"createdBy": "phpunit@example.com",
"credentials": [
{
"apiProducts": [],
@@ -30,6 +31,7 @@
],
"developerId": "f43ffa3c-e147-47de-8cd6-f5b34429a531",
"lastModifiedAt": 648345600000,
"lastModifiedBy": "phpunit@example.com",
"name": "phpunit_test_app",
"scopes": [],
"status": "approved"
Original file line number Diff line number Diff line change
@@ -16,6 +16,7 @@
],
"callbackUrl": "http://example.com",
"createdAt": 648345600000,
"createdBy": "phpunit@example.com",
"credentials": [
{
"apiProducts": [],
@@ -30,6 +31,7 @@
],
"companyName": "phpunit",
"lastModifiedAt": 648345600000,
"lastModifiedBy": "phpunit@example.com",
"name": "phpunit_test_app",
"scopes": [],
"status": "approved"
Original file line number Diff line number Diff line change
@@ -12,7 +12,9 @@
}
],
"createdAt": 648345600000,
"lastModifiedAt": 648345600000
"createdBy": "phpunit@example.com",
"lastModifiedAt": 648345600000,
"lastModifiedBy": "phpunit@example.com"
},
{
"apps": [],
@@ -26,7 +28,9 @@
}
],
"createdAt": 648345600000,
"lastModifiedAt": 648345600000
"createdBy": "phpunit@example.com",
"lastModifiedAt": 648345600000,
"lastModifiedBy": "phpunit@example.com"
}
]
}
Original file line number Diff line number Diff line change
@@ -12,7 +12,9 @@
}
],
"createdAt": 648345600000,
"lastModifiedAt": 648345600000
"createdBy": "phpunit@example.com",
"lastModifiedAt": 648345600000,
"lastModifiedBy": "phpunit@example.com"
},
{
"apps": [],
@@ -26,7 +28,9 @@
}
],
"createdAt": 648345600000,
"lastModifiedAt": 648345600000
"createdBy": "phpunit@example.com",
"lastModifiedAt": 648345600000,
"lastModifiedBy": "phpunit@example.com"
}
]
}
Original file line number Diff line number Diff line change
@@ -12,7 +12,9 @@
}
],
"createdAt": 648345600000,
"lastModifiedAt": 648345600000
"createdBy": "phpunit@example.com",
"lastModifiedAt": 648345600000,
"lastModifiedBy": "phpunit@example.com"
}
]
}
Original file line number Diff line number Diff line change
@@ -12,7 +12,9 @@
}
],
"createdAt": 648345600000,
"lastModifiedAt": 648345600000
"createdBy": "phpunit@example.com",
"lastModifiedAt": 648345600000,
"lastModifiedBy": "phpunit@example.com"
},
{
"apps": [],
@@ -26,7 +28,9 @@
}
],
"createdAt": 648345600000,
"lastModifiedAt": 648345600000
"createdBy": "phpunit@example.com",
"lastModifiedAt": 648345600000,
"lastModifiedBy": "phpunit@example.com"
},
{
"apps": [],
@@ -40,7 +44,9 @@
}
],
"createdAt": 648345600000,
"lastModifiedAt": 648345600000
"createdBy": "phpunit@example.com",
"lastModifiedAt": 648345600000,
"lastModifiedBy": "phpunit@example.com"
},
{
"apps": [],
@@ -54,7 +60,9 @@
}
],
"createdAt": 648345600000,
"lastModifiedAt": 648345600000
"createdBy": "phpunit@example.com",
"lastModifiedAt": 648345600000,
"lastModifiedBy": "phpunit@example.com"
},
{
"apps": [],
@@ -68,7 +76,9 @@
}
],
"createdAt": 648345600000,
"lastModifiedAt": 648345600000
"createdBy": "phpunit@example.com",
"lastModifiedAt": 648345600000,
"lastModifiedBy": "phpunit@example.com"
}
]
}
Original file line number Diff line number Diff line change
@@ -10,5 +10,7 @@
}
],
"createdAt": 648345600000,
"lastModifiedAt": 648345600000
"createdBy": "phpunit@example.com",
"lastModifiedAt": 648345600000,
"lastModifiedBy": "phpunit@example.com"
}
Original file line number Diff line number Diff line change
@@ -10,5 +10,7 @@
}
],
"createdAt": 648345600000,
"lastModifiedAt": 648345600000
"createdBy": "phpunit@example.com",
"lastModifiedAt": 648345600000,
"lastModifiedBy": "phpunit@example.com"
}
Original file line number Diff line number Diff line change
@@ -14,5 +14,7 @@
}
],
"createdAt": 648345600000,
"lastModifiedAt": 648345600000
"createdBy": "phpunit@example.com",
"lastModifiedAt": 648345600000,
"lastModifiedBy": "phpunit@example.com"
}
Loading

0 comments on commit 17c0651

Please sign in to comment.