You are here

function CoderStyleTest::testStyleStringConcatentation in Coder 6.2

File

tests/coder_style.test, line 82

Class

CoderStyleTest

Code

function testStyleStringConcatentation() {
  $this
    ->assertCoderPass('  if ($file = file_check_upload($fieldname . "_upload")) {');
  $this
    ->assertCoderPass('  $v .= \'bugger\';');
  $this
    ->assertCoderPass('  $a = $v .\'bugger\';');
  $this
    ->assertCoderPass('  $a = $v ."bugger";');
  $this
    ->assertCoderFail('  $a = $v.\'bugger\';');
  $this
    ->assertCoderFail('  $a = $some_func().\'bugger\';');
  $this
    ->assertCoderPass('  $a = 1.0 * .1 * 1. * (0.1) * (1.) * (.1) * (1.0);');
}