public function testWeekdays() { $days = Weekdays::getWeekdays(); $this->assertEquals(7, count($days)); foreach (self::$slugs as $i => $slug) { $this->assertEquals($slug, $days[$i]->getSlug()); } }
/** * Opening Hours: Template: Part: MetaBox OP Set */ use OpeningHours\Module\OpeningHours; use OpeningHours\Module\CustomPostType\MetaBox\OpeningHours as MetaBox; use OpeningHours\Util\Weekdays; MetaBox::nonceField(); ?> <div class="opening-hours"> <table class="form-table form-opening-hours"> <tbody> <?php foreach (Weekdays::getWeekdays() as $index => $weekday) { ?> <tr class="periods-day"> <td class="col-name" valign="top"> <?php echo $weekday->getName(); ?> </td> <td class="col-times" colspan="2" valign="top"> <div class="period-container" data-day="<?php echo $index; ?> " data-set="<?php echo OpeningHours::getCurrentSet()->getId();