예제 #1
0
 public function testAddGetCustomNumericFunction()
 {
     $this->configuration->addCustomNumericFunction('FunctionName', __CLASS__);
     $this->assertSame(__CLASS__, $this->configuration->getCustomNumericFunction('FunctionName'));
     $this->assertSame(null, $this->configuration->getCustomNumericFunction('NonExistingFunction'));
     $this->configuration->setCustomNumericFunctions(array('OtherFunctionName' => __CLASS__));
     $this->assertSame(__CLASS__, $this->configuration->getCustomNumericFunction('OtherFunctionName'));
     $this->setExpectedException('Doctrine\\ORM\\ORMException');
     $this->configuration->addCustomNumericFunction('abs', __CLASS__);
 }