e107inc / e107-test

For developmental use with e107 v2.
2 stars 2 forks source link

e_parseTest::testToForm() #11

Closed SimSync closed 6 years ago

SimSync commented 6 years ago

@CaMer0n In the mentioned test, you are comparing $db to $actual, but shouldn't it be $orig to $actual? Or am i getting something wrong?

                public function testToForm()
        {
            $orig = "lr.src = window._lr.url + '/Scripts/api.js';";
            $db = $this->tp->toDB($orig);
            $actual = $this->tp->toForm($db);
            $this->assertEquals($db,$actual);       
        }

And even if that would be correct, why should i use toForm() if the result is the same as without...?

CaMer0n commented 6 years ago

@SimSync You're right, that's a typo.

CaMer0n commented 6 years ago

Actually, perhaps the $actual should NOT match the $orig? Could those single quotes break the HTML inside of a