function CoderStyleTest::testStyleControlStructures in Coder 6.2
File
- tests/
coder_style.test, line 72
Class
Code
function testStyleControlStructures() {
$this
->assertCoderFail(' if ($a == 1) { }');
$this
->assertCoderPass(' if ($a == 1) {');
$this
->assertCoderFail(' }else {');
$this
->assertCoderFail(' if ($a == 1) { $b = 2;');
$this
->assertCoderFail(' if ($a == 1) {$b = 2;');
$this
->assertCoderFail(' else if ($a == 1) {');
$this
->assertCoderPass(' elseif ($a == 1) {');
}