Commit 68a4633e authored by Guilherme Blanco's avatar Guilherme Blanco

Merge pull request #269 from deeky666/fix-sqlserverplatform-regexp

Fix SQLServerPlatform regular expression SQL
parents fc77f6de dd326cdf
......@@ -34,6 +34,7 @@ use Doctrine\DBAL\Schema\Table;
* @author Roman Borschel <roman@code-factory.org>
* @author Jonathan H. Wage <jonwage@gmail.com>
* @author Benjamin Eberlei <kontakt@beberlei.de>
* @author Steve Müller <st.mueller@dzh-online.de>
*/
class SQLServerPlatform extends AbstractPlatform
{
......@@ -463,14 +464,6 @@ class SQLServerPlatform extends AbstractPlatform
return 'DROP VIEW ' . $name;
}
/**
* {@inheritDoc}
*/
public function getRegexpExpression()
{
return 'RLIKE';
}
/**
* {@inheritDoc}
*/
......
......@@ -36,9 +36,16 @@ class SQLServerPlatformTest extends AbstractPlatformTestCase
);
}
/**
* @expectedException Doctrine\DBAL\DBALException
*/
public function testDoesNotSupportRegexp()
{
$this->_platform->getRegexpExpression();
}
public function testGeneratesSqlSnippets()
{
$this->assertEquals('RLIKE', $this->_platform->getRegexpExpression(), 'Regular expression operator is not correct');
$this->assertEquals('"', $this->_platform->getIdentifierQuoteCharacter(), 'Identifier quote character is not correct');
$this->assertEquals('(column1 + column2 + column3)', $this->_platform->getConcatExpression('column1', 'column2', 'column3'), 'Concatenation expression is not correct');
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment