You are here

function CoderStyleTest::testStyleCamelCase in Coder 6.2

File

tests/coder_style.test, line 37

Class

CoderStyleTest

Code

function testStyleCamelCase() {
  $this
    ->assertCoderPass('  $var = new stdClass();');
  $this
    ->assertCoderPass('  $var = $obj->camelCase();');
  $this
    ->assertCoderFail('  $camelCase = "1";');
  $this
    ->assertCoderFail('  function camelCase() {');
  $this
    ->assertCoderPass("  class myClass {\nfunction camelCase() {");
  $this
    ->assertCoderPass("  interface myClass {\nfunction camelCase() {");
  $this
    ->assertCoderPass('  ?>This is embedded php and should Not trigger a camelCase error.<?php');
  $this
    ->assertCoderPass("  ?>This second embedded php and should Not trigger\na camelCase error.<?php");
  $this
    ->assertCoderPass('  $var = 0xFF;');
}