Commit dd326cdf authored by Steve Müller's avatar Steve Müller

Fix SQLServerPlatform regular expression SQL

parent 3ba21503
......@@ -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
{
......@@ -455,14 +456,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