Exemple #1
0
 /**
  * Test if can add a code fragment to existing code.
  */
 public function testAddCodeToExistingCode()
 {
     $fragment1 = sha1(microtime(true));
     $fragment2 = sha1(microtime(true));
     $expected = $fragment1;
     $expected .= $fragment2;
     $code = new PHPRawCode();
     $code->setCode($fragment1);
     $code->addCode($fragment2);
     $this->assertSame($expected, $code->getCode());
 }