/** * @covers \Pressbooks\Utility\group_exports */ public function test_group_exports() { $files = \Pressbooks\Utility\group_exports(); $this->assertTrue(is_array($files)); $files = \Pressbooks\Utility\group_exports(__DIR__); $this->assertNotContains('.htaccess', $files); }
</div> <!-- .export-config --> <div class="export-control"> <p><input id="pb-export-button" type="button" class="button button-hero button-primary generate" value="<?php esc_attr_e('Export Your Book', 'pressbooks'); ?> " /></p> <p id="loader"><img src="<?php echo PB_PLUGIN_URL; ?> assets/dist/images/loader.gif" alt="Exporting..." width="128" height="15" /></p> <?php $c = 0; // start counter $files = \Pressbooks\Utility\group_exports(); foreach ($files as $date => $exports) { // Echo files to screen if (0 == $c) { ?> <h2><?php _e('Latest Export', 'pressbooks'); ?> : <?php printf(_x('%1$s at %2$s', 'Date and time string, e.g. "January 1, 2016 at 12:00pm', 'pressbooks'), date($date_format, $date), date($time_format, $date)); ?> </h2> <div class="export-files latest"> <?php } elseif ($c > 0) { ?>