Files
hoponhopofftickets/viator-collector/tests/run.php
Amir Bagheri de9814cf3d feat: tour page photos-first layout, mobile booking bar; board 1 fixes
Tour page (boards 2 and 3):
- Replace the blurred 'Welcome to {city}' hero with a breadcrumb and a photo
  gallery (1 large + 2, 'All N photos' opens the lightbox); the H1 title,
  rating with review count and facts follow; booking card stays sticky
- Phones/tablets: swipeable photos, name before price, 2x2 facts, and a
  fixed bottom bar with price + Check availability (vc-tour.css)

Board 1:
- Hide Viator internal tags ('Agent Low Quality Product'...) from the tour
  category, listing filter and activities section (VC_Tags, tested)
- Listings: run the query filter late and set posts_per_archive_page so
  pages show 12 tours as the count says
- Footer columns without a menu show default links (quick links, structure
  cities, contact/about/faq) instead of empty headings

Plugin 1.9.5, theme 1.0.13.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 21:01:13 +03:30

46 lines
1.1 KiB
PHP

<?php
/**
* Minimal test runner for the WordPress-free parts of the plugin.
*
* php tests/run.php
*/
define( 'ABSPATH', __DIR__ . '/' );
require_once dirname( __DIR__ ) . '/includes/class-vc-structure.php';
require_once dirname( __DIR__ ) . '/includes/class-vc-tags.php';
function vc_assert_same( $expected, $actual, $msg = '' ) {
if ( $expected !== $actual ) {
throw new Exception( $msg . "\n expected: " . var_export( $expected, true ) . "\n actual: " . var_export( $actual, true ) );
}
}
function vc_assert_contains( $needle, array $errors ) {
if ( ! in_array( $needle, $errors, true ) ) {
throw new Exception( 'Missing error: ' . $needle . "\n got: " . var_export( $errors, true ) );
}
}
foreach ( glob( __DIR__ . '/test-*.php' ) as $file ) {
require_once $file;
}
$passed = 0;
$failed = 0;
foreach ( get_defined_functions()['user'] as $fn ) {
if ( 0 !== strpos( $fn, 'test_' ) ) {
continue;
}
try {
$fn();
$passed++;
} catch ( Throwable $e ) {
$failed++;
echo 'FAIL ' . $fn . ': ' . $e->getMessage() . "\n";
}
}
echo $passed . ' passed, ' . $failed . " failed\n";
exit( $failed ? 1 : 0 );