/** * @param \Box\TestScribe\InputHistory\InputHistoryData $historyData * * @return string */ private function convertToYamlString(InputHistoryData $historyData) { $dumper = new Dumper(); $data = $historyData->getData(); $dataInYaml = $dumper->dump($data, 2); return $dataInYaml; }
/** * @covers Box\TestScribe\Utils\ValueTransformer */ public function test_object_with_JsonSerializable_support() { // Execute the method under test. $inputHistoryData = new InputHistoryData(); $inputHistoryData->setData(['key' => 'value']); $objectUnderTest = new \Box\TestScribe\Utils\ValueTransformer(); $executionResult = $objectUnderTest->translateObjectsAndResourceToString($inputHistoryData); // Validate the execution result. $expected = '( Box\\TestScribe\\InputHistory\\InputHistoryData ) object value ( {"key":"value"} )'; $this->assertSame($expected, $executionResult, 'Variable ( executionResult ) doesn\'t have the expected value.'); }