function CoderReviewStyleTest::testStyleControlStructures in Coder 7
Same name and namespace in other branches
- 7.2 coder_review/tests/coder_review_style.test \CoderReviewStyleTest::testStyleControlStructures()
File
- coder_review/
tests/ coder_review_style.test, line 71
Class
Code
function testStyleControlStructures() {
$this
->assertCoderReviewFail(' if ($a == 1) { }');
$this
->assertCoderReviewPass(' if ($a == 1) {');
$this
->assertCoderReviewFail(' }else {');
$this
->assertCoderReviewFail(' if ($a == 1) { $b = 2;');
$this
->assertCoderReviewFail(' if ($a == 1) {$b = 2;');
$this
->assertCoderReviewFail(' else if ($a == 1) {');
$this
->assertCoderReviewPass(' elseif ($a == 1) {');
}