Пример #1
0
 public function testJuggling()
 {
     $equalities = array('"1" == 1' => 1, '"5" + "2"' => 7, '"1" == 0' => '', '1 == "1"' => 1, '1 + "2"' => 3, '"1" + "a"' => '1a', '1 + "a"' => '1a', '"05" + "1"' => 6, '"" + "1" + "2"' => 12);
     foreach ($equalities as $expression => $expected) {
         $result = $this->em->sProcessStringContainingExpressions('{' . $expression . '}');
         $this->assertEquals($expected, $result);
     }
 }