function test_largo_social_links() { // this function only creates output if there are >0 social links $fields = array('rss_link', 'facebook_link', 'twitter_link', 'youtube_link', 'flickr_link', 'tumblr_link', 'gplus_link', 'linkedin_link', 'github_link'); foreach ($fields as $field) { of_set_option($field, 'http://foo.bar\\/' . $field); $this->expectOutputRegex('/http:\\/\\/foo.bar\\/' . $field . '/'); // This is excessively greedy, it expects any output at all largo_social_links(); of_reset_options(); } }
<div id="boilerplate"> <div class="row-fluid clearfix"> <div class="span9"> <ul id="footer-social" class="social-icons"> <?php largo_social_links(); ?> </ul> </div> <?php if (INN_MEMBER) { ?> <div class="span3"> <a href="//inn.org/"> <img id="inn-logo" src="<?php echo get_template_directory_uri() . "/img/inn_logo_reversetype.png"; ?> " alt="<?php printf(__("%s is a member of the Institute for Nonprofit News", "largo"), get_bloginfo('name')); ?> " /> </a> <?php if (of_get_option('inn_member_since')) { ?> <p id="mobile-member-since" class="visible-phone"><?php printf(__("Proud member since %s", "largo"), of_get_option('inn_member_since')); ?> </p> <?php