You are here

function CoderStyleTest::testStyleArrayIndex in Coder 6.2

File

tests/coder_style.test, line 23

Class

CoderStyleTest

Code

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