# simpleanalytics/1.110/tests/Browser/phpRegression.spec.ts

Simple Analytics, version 1.110. 17 lines.

- Page: https://pluginprobe.com/plugins/simpleanalytics/1.110/code/tests/Browser/phpRegression.spec.ts
- Raw: https://pluginprobe.com/plugins/simpleanalytics/1.110/raw/tests/Browser/phpRegression.spec.ts
- Modified: 2026-09-16T13:31:38+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/simpleanalytics/1.110/code/tests/Browser/phpRegression.spec.ts#L10-L20`.

```typescript
import { test, expect } from '@playwright/test';
import { execFileSync } from 'node:child_process';
import { readdirSync } from 'node:fs';
import { basename, resolve } from 'node:path';

// Each script uses its own temporary options table, so these checks can run
// alongside browser tests without changing their WordPress settings.
for (const file of readdirSync(resolve('tests/Regression')).filter(name => name.endsWith('.php'))) {
  test(`WordPress regression: ${file}`, () => {
    const output = execFileSync(resolve('node_modules/.bin/wp-env'), [
      'run', 'cli', 'wp', 'eval-file',
      `wp-content/plugins/${basename(process.cwd())}/tests/Regression/${file}`,
    ], { encoding: 'utf8', timeout: 45000 });
    expect(output).toContain('Regression checks passed');
  });
}

```
