Skip to content
This repository
Browse code

Added tests for ensuring escaping

  • Loading branch information...
commit 066783e3db2c8d0db9c21bcb28a42c6e9acc968b 1 parent 2008dba
Jared Williams JaredWilliams authored

Showing 1 changed file with 6 additions and 1 deletion. Show diff stats Hide diff stats

  1. +6 1 tests/ZendTest/Db/Adapter/Platform/MysqlTest.php
7 tests/ZendTest/Db/Adapter/Platform/MysqlTest.php
@@ -50,8 +50,9 @@ public function testGetQuoteIdentifierSymbol()
50 50 public function testQuoteIdentifier()
51 51 {
52 52 $this->assertEquals('`identifier`', $this->platform->quoteIdentifier('identifier'));
  53 + $this->assertEquals('`ident``ifier`', $this->platform->quoteIdentifier('ident`ifier'));
53 54 }
54   -
  55 +
55 56 /**
56 57 * @covers Zend\Db\Adapter\Platform\Mysql::quoteIdentifierChain
57 58 */
@@ -60,6 +61,10 @@ public function testQuoteIdentifierChain()
60 61 $this->assertEquals('`identifier`', $this->platform->quoteIdentifierChain('identifier'));
61 62 $this->assertEquals('`identifier`', $this->platform->quoteIdentifierChain(array('identifier')));
62 63 $this->assertEquals('`schema`.`identifier`', $this->platform->quoteIdentifierChain(array('schema','identifier')));
  64 +
  65 + $this->assertEquals('`ident``ifier`', $this->platform->quoteIdentifierChain('ident`ifier'));
  66 + $this->assertEquals('`ident``ifier`', $this->platform->quoteIdentifierChain(array('ident`ifier')));
  67 + $this->assertEquals('`schema`.`ident``ifier`', $this->platform->quoteIdentifierChain(array('schema','ident`ifier')));
63 68 }
64 69
65 70 /**

0 comments on commit 066783e

Please sign in to comment.
Something went wrong with that request. Please try again.