/**
  * @param array $state
  * @dataProvider dataProviderMetadataState
  */
 public function testItCreatesAnObjectWithPassedStateArray(array $state)
 {
     $metadata = Metadata::__set_state($state);
     $this->assertInstanceOf('EcomDev_LayoutCompiler_Contract_Compiler_MetadataInterface', $metadata);
     $this->assertSame($state['id'], $metadata->getId());
     $this->assertSame($state['checksum'], $metadata->getChecksum());
     $this->assertSame($state['handles'], $metadata->getHandles());
     $this->assertSame($state['savePath'], $metadata->getSavePath());
 }
 /**
  * Data provider for save operation test
  * 
  * @return array[]
  */
 public function dataProviderMetadataObjectsToFile()
 {
     $fileLine = '$this->addMetadata(%s);';
     $file = "<?php \n%s";
     return array('item_one' => array(array($metadataOne = Metadata::__set_state(array('handles' => array('item1', 'item2'), 'id' => 'item_one', 'checksum' => 'checksum_one', 'savePath' => '/some/path/one')), $metadataTwo = Metadata::__set_state(array('handles' => array('item2', 'item3'), 'id' => 'item_two', 'checksum' => 'checksum_two', 'savePath' => '/some/path/two'))), sprintf($file, implode("\n", array(sprintf($fileLine, var_export($metadataOne, true)), sprintf($fileLine, var_export($metadataTwo, true)))))), 'item_two' => array(array($metadataOne = Metadata::__set_state(array('handles' => array('item3', 'item4'), 'id' => 'item_three', 'checksum' => 'checksum_three', 'savePath' => '/some/path/one'))), sprintf($file, sprintf($fileLine, var_export($metadataOne, true)))), 'empty' => array(array(), sprintf($file, '')));
 }