set_anchor_layout_for() public method

Sets the required layout for a component to anchor another component or be anchored.
public set_anchor_layout_for ( Component $component )
$component Apple_Exporter\Components\Component
 public function testLeftLayoutGetsAdded()
 {
     $layouts = new Component_Layouts($this->content, $this->settings);
     $this->assertFalse(array_key_exists('anchor-layout-left', $layouts->to_array()));
     $component = $this->prophet->prophesize('\\Apple_Exporter\\Components\\Component');
     $component->get_anchor_position()->willReturn(Component::ANCHOR_LEFT)->shouldBeCalled();
     $component->is_anchor_target()->willReturn(false)->shouldBeCalled();
     $component->set_json('layout', 'anchor-layout-left')->shouldBeCalled();
     $layouts->set_anchor_layout_for($component->reveal());
     $this->assertTrue(array_key_exists('anchor-layout-left', $layouts->to_array()));
 }