view vendor/nikic/php-parser/test/code/formatPreservation/inlineHtml.test @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents 5fb285c0d0e3
children
line wrap: on
line source
Handling of inline HTML
-----
<?php

function test() {
    ?>Foo<?php
}
-----
$stmts[0]->setAttribute('origNode', null);
-----
<?php

function test()
{
    ?>Foo<?php
}
-----
<?php

function test() {
    foo();
    ?>Bar<?php
    baz();
}
-----
// TODO Fix broken result
$stmts[0]->stmts[2] = $stmts[0]->stmts[1];
-----
<?php

function test() {
    foo();
    ?>Bar<?php
    Bar
}
-----
<?php

function test() {
    foo();
    ?>Bar<?php
    baz();
}
-----
// TODO Fix broken result
$stmts[0]->stmts[1] = $stmts[0]->stmts[2];
-----
<?php

function test() {
    foo();<?php
    baz();
    baz();
}