You are here

function CoderReviewStyleTest::testStyleArrayIndex in Coder 7

Same name and namespace in other branches
  1. 7.2 coder_review/tests/coder_review_style.test \CoderReviewStyleTest::testStyleArrayIndex()

File

coder_review/tests/coder_review_style.test, line 22

Class

CoderReviewStyleTest

Code

function testStyleArrayIndex() {
  $this
    ->assertCoderReviewPass('$some_array[FOO_BAR] = $baz;');
  $this
    ->assertCoderReviewFail('$some_array[foo_bar] = $baz;');
  $this
    ->assertCoderReviewFail('  $a[hello] = "hello";');
  $this
    ->assertCoderReviewPass('  $a[\'hello\'] = "hello";');
}