You are here

function CoderReviewStyleTest::testStyleCamelCase in Coder 7

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

File

coder_review/tests/coder_review_style.test, line 36

Class

CoderReviewStyleTest

Code

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