开发者

Test if a file is loaded

Is there a way in phpUnit to test if for example a certain css file is loaded?

In other 开发者_开发技巧words, i want to check if a css file is loaded (if possible). I want to make sure the HMTL output has a style tag with a certain css file.


You can do it as Foe example the page source will display the css file as

<style src="mycss.css" type="text/css"></style>

Then following statement will check that the element present or not

$this->assertTrue($this->isElementPresent("//style[@src='mycss.css']"));
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜