get_image_attachment() public static méthode

public static get_image_attachment ( $pid, $file = 'arch.jpg' )
 function testTimberImageInTwigToString()
 {
     $iid = TestTimberImage::get_image_attachment();
     $str = '{{TimberImage(' . $iid . ')}}';
     $compiled = Timber::compile_string($str);
     $this->assertEquals('http://example.org/wp-content/uploads/' . date('Y') . '/' . date('m') . '/arch.jpg', $compiled);
 }
 function testSiteIcon()
 {
     $icon_id = TestTimberImage::get_image_attachment(0, 'cardinals.jpg');
     update_option('site_icon', $icon_id);
     $site = new TimberSite();
     $icon = $site->icon();
     $this->assertEquals('Timber\\Image', get_class($icon));
     $this->assertContains('cardinals.jpg', $icon->src());
 }