Skip to content

Commit

Permalink
Save custom objects using custom doctrine type mappings - Refactor te…
Browse files Browse the repository at this point in the history
…st function names
  • Loading branch information
Stephan-Kok committed Sep 13, 2021
1 parent c9fd2a2 commit 44d4a9c
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function a_null_value_remains_null_in_to_sql_conversion()
* @group EngineBlockBundle
* @group Doctrine
*/
public function AttributeReleasePolicy_converted_to_json()
public function attribute_release_policy_converted_to_json()
{
$arpType = Type::getType(AttributeReleasePolicyType::NAME);
$arp = array();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function a_null_value_remains_null_in_to_sql_conversion()
* @group EngineBlockBundle
* @group Doctrine
*/
public function CertificateArrayType_converted_to_json()
public function certificate_array_type_converted_to_json()
{
$certType = Type::getType(CertificateArrayType::NAME);
$certificateArray = [new X509CertificateLazyProxy(new X509CertificateFactory(), $this->certData)];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function a_null_value_remains_null_in_to_sql_conversion()
* @group EngineBlockBundle
* @group Doctrine
*/
public function ContactPersonArrayType_converted_to_json()
public function contact_person_array_type_converted_to_json()
{
$contactPersonType = Type::getType(ContactPersonArrayType::NAME);
$contactPerson = [new ContactPerson("support")];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function a_null_value_remains_null_in_to_sql_conversion()
* @group EngineBlockBundle
* @group Doctrine
*/
public function IndexedServiceArrayType_converted_to_json()
public function indexed_service_array_type_converted_to_json()
{
$indexedServiceArrayType = Type::getType(IndexedServiceArrayType::NAME);
$serviceIndex = [new IndexedService("location", "binding", 0)];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function a_null_value_remains_null_in_to_sql_conversion()
* @group EngineBlockBundle
* @group Doctrine
*/
public function LogoType_converted_to_json()
public function logo_type_converted_to_json()
{
$logoType = Type::getType(LogoType::NAME);
$logo = new Logo("location");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function a_null_value_remains_null_in_to_sql_conversion()
* @group EngineBlockBundle
* @group Doctrine
*/
public function OrganizationType_converted_to_json()
public function organization_type_converted_to_json()
{
$organizationType = Type::getType(OrganizationType::NAME);
$organization = new Organization("name", "displayName", "url");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function a_null_value_remains_null_in_to_sql_conversion()
* @group EngineBlockBundle
* @group Doctrine
*/
public function RequestedAttributeArrayType_converted_to_json()
public function requested_attribute_array_type_converted_to_json()
{
$requestedAttributeArrayType = Type::getType(RequestedAttributeArrayType::NAME);
$requestedAttribute = [new RequestedAttribute("name")];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ public function a_null_value_remains_null_in_to_sql_conversion()
* @group EngineBlockBundle
* @group Doctrine
*/
public function ServiceArrayType_converted_to_json()
public function service_array_type_converted_to_json()
{
$ServiceArrayType = Type::getType(ServiceArrayType::NAME);
$serviceArrayType = Type::getType(ServiceArrayType::NAME);
$serviceArray = [new Service("location", "binding")];
$value = $ServiceArrayType->convertToDatabaseValue($serviceArray, $this->platform);
$value = $serviceArrayType->convertToDatabaseValue($serviceArray, $this->platform);

$this->assertEquals(json_encode($serviceArray), $value);
}
Expand All @@ -86,9 +86,9 @@ public function ServiceArrayType_converted_to_json()
*/
public function a_null_value_is_converted_to_null()
{
$ServiceArrayType = Type::getType(ServiceArrayType::NAME);
$serviceArrayType = Type::getType(ServiceArrayType::NAME);

$value = $ServiceArrayType->convertToPHPValue(null, $this->platform);
$value = $serviceArrayType->convertToPHPValue(null, $this->platform);

$this->assertNull($value);
}
Expand All @@ -100,10 +100,10 @@ public function a_null_value_is_converted_to_null()
*/
public function saved_object_equals_result()
{
$ServiceArrayType = Type::getType(ServiceArrayType::NAME);
$serviceArrayType = Type::getType(ServiceArrayType::NAME);
$serviceArray = [new Service("location", "binding")];

$value = $ServiceArrayType->convertToPHPValue($ServiceArrayType->convertToDatabaseValue($serviceArray, $this->platform),
$value = $serviceArrayType->convertToPHPValue($serviceArrayType->convertToDatabaseValue($serviceArray, $this->platform),
$this->platform);

$this->assertEquals($serviceArray, $value);
Expand All @@ -116,10 +116,10 @@ public function saved_object_equals_result()
*/
public function an_invalid_php_value_causes_an_exception_upon_conversion()
{
$ServiceArrayType = Type::getType(ServiceArrayType::NAME);
$serviceArrayType = Type::getType(ServiceArrayType::NAME);

$this->expectException(ConversionException::class);
$ServiceArrayType->convertToDatabaseValue(false, $this->platform);
$serviceArrayType->convertToDatabaseValue(false, $this->platform);
}

/**
Expand All @@ -129,9 +129,9 @@ public function an_invalid_php_value_causes_an_exception_upon_conversion()
*/
public function an_invalid_database_value_causes_an_exception_upon_conversion()
{
$ServiceArrayType = Type::getType(ServiceArrayType::NAME);
$serviceArrayType = Type::getType(ServiceArrayType::NAME);

$this->expectException(ConversionException::class);
$ServiceArrayType->convertToPHPValue(false, $this->platform);
$serviceArrayType->convertToPHPValue(false, $this->platform);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function a_null_value_remains_null_in_to_sql_conversion()
* @group EngineBlockBundle
* @group Doctrine
*/
public function ShibMdScopeArrayType_converted_to_json()
public function shib_md_scope_array_type_converted_to_json()
{
$shibMdScopeArrayType = Type::getType(ShibMdScopeArrayType::NAME);
$shibMdScopeArray = [new ShibMdScope()];
Expand Down

0 comments on commit 44d4a9c

Please sign in to comment.