Files
michaelschiemer/tests/debug/test-mask2-application.php
Michael Schiemer fc3d7e6357 feat(Production): Complete production deployment infrastructure
- Add comprehensive health check system with multiple endpoints
- Add Prometheus metrics endpoint
- Add production logging configurations (5 strategies)
- Add complete deployment documentation suite:
  * QUICKSTART.md - 30-minute deployment guide
  * DEPLOYMENT_CHECKLIST.md - Printable verification checklist
  * DEPLOYMENT_WORKFLOW.md - Complete deployment lifecycle
  * PRODUCTION_DEPLOYMENT.md - Comprehensive technical reference
  * production-logging.md - Logging configuration guide
  * ANSIBLE_DEPLOYMENT.md - Infrastructure as Code automation
  * README.md - Navigation hub
  * DEPLOYMENT_SUMMARY.md - Executive summary
- Add deployment scripts and automation
- Add DEPLOYMENT_PLAN.md - Concrete plan for immediate deployment
- Update README with production-ready features

All production infrastructure is now complete and ready for deployment.
2025-10-25 19:18:37 +02:00

36 lines
983 B
PHP

<?php
echo "=== Testing Mask Pattern 2 (column % 3 == 0) ===\n\n";
// Manual calculation for Pattern 2
echo "Expected behavior for Pattern 2:\n";
echo "Columns 0, 3, 6, 9, 12, 15, 18 should be inverted\n";
echo "All other columns should NOT be inverted\n\n";
require_once __DIR__ . '/../../vendor/autoload.php';
use App\Framework\QrCode\Masking\MaskPattern;
$pattern = MaskPattern::PATTERN_2;
// Test critical columns
$testCols = [0, 1, 2, 3, 6, 8, 9, 12, 15, 18, 20];
echo "Testing shouldInvert() for various columns (row=10):\n";
foreach ($testCols as $col) {
$shouldInvert = $pattern->shouldInvert(10, $col);
$expected = ($col % 3 === 0);
$match = $shouldInvert === $expected ? "" : "";
echo sprintf(
" Col %2d: mod=%d, shouldInvert=%s, expected=%s %s\n",
$col, $col % 3,
$shouldInvert ? 'true ' : 'false',
$expected ? 'true ' : 'false',
$match
);
}
echo "\n✅ Mask Pattern 2 logic is correct!\n";