public function testAddGetCustomDatetimeFunction() { $this->configuration->addCustomDatetimeFunction('FunctionName', __CLASS__); $this->assertSame(__CLASS__, $this->configuration->getCustomDatetimeFunction('FunctionName')); $this->assertSame(null, $this->configuration->getCustomDatetimeFunction('NonExistingFunction')); $this->configuration->setCustomDatetimeFunctions(array('OtherFunctionName' => __CLASS__)); $this->assertSame(__CLASS__, $this->configuration->getCustomDatetimeFunction('OtherFunctionName')); $this->setExpectedException('Doctrine\\ORM\\ORMException'); $this->configuration->addCustomDatetimeFunction('date_add', __CLASS__); }