diff --git a/packages/playground/blueprints/src/lib/steps/site-data.spec.ts b/packages/playground/blueprints/src/lib/steps/site-data.spec.ts new file mode 100644 index 0000000000..bcabec8a38 --- /dev/null +++ b/packages/playground/blueprints/src/lib/steps/site-data.spec.ts @@ -0,0 +1,37 @@ +import { NodePHP } from '@php-wasm/node'; +import { + RecommendedPHPVersion, + getWordPressModule, +} from '@wp-playground/wordpress'; +import { setSiteOptions } from './site-data'; +import { unzip } from './unzip'; + +describe('Blueprint step setSiteOptions()', () => { + let php: NodePHP; + beforeEach(async () => { + php = await NodePHP.load(RecommendedPHPVersion, { + requestHandler: { + documentRoot: '/wordpress', + }, + }); + await unzip(php, { + zipFile: await getWordPressModule(), + extractToPath: '/wordpress', + }); + }); + + it('should set the site option', async () => { + await setSiteOptions(php, { + options: { + blogname: 'My test site!', + }, + }); + const response = await php.run({ + code: `