Skip to content

Commit

Permalink
Replaced arrayToYaml with yaml_emit
Browse files Browse the repository at this point in the history
  • Loading branch information
rennokki committed Sep 15, 2021
1 parent 221ea94 commit 842809d
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions tests/YamlTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function test_yaml_import_for_crds()
{
IstioGateway::register();

$gatewayYaml = $this->arrayToYaml(
$gatewayYaml = yaml_emit(
$this->cluster
->istioGateway()
->setName('test-gateway')
Expand Down Expand Up @@ -88,7 +88,7 @@ public function test_yaml_import_for_crds_without_namespace()
{
IstioGatewayNoNamespacedVersion::register('istioGateway');

$gatewayYaml = $this->arrayToYaml(
$gatewayYaml = yaml_emit(
$this->cluster
->istioGateway()
->setName('test-gateway')
Expand Down Expand Up @@ -119,15 +119,4 @@ public function test_yaml_import_for_crds_without_namespace()

$this->assertInstanceOf(IstioGatewayNoNamespacedVersion::class, $gateway);
}

/**
* Transform array to YAML content.
*
* @param array $arr
* @return string
*/
protected function arrayToYaml(array $arr)
{
return str_replace("---\n", '', yaml_emit($arr));
}
}

0 comments on commit 842809d

Please sign in to comment.