1<?php
2/*
3 *  $Id$
4 *
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
16 *
17 * This software consists of voluntary contributions made by many individuals
18 * and is licensed under the LGPL. For more information, see
19 * <http://www.doctrine-project.org>.
20 */
21
22/**
23 * Doctrine_Ticket_927_TestCase
24 *
25 * @package     Doctrine
26 * @author      David Stendardi <david.stendardi@adenclassifieds.com>
27 * @category    Query
28 * @link        www.doctrine-project.org
29 * @since       0.10.4
30 * @version     $Revision$
31 */
32class Doctrine_Ticket_927_TestCase extends Doctrine_UnitTestCase
33{
34    public function prepareData()
35    {
36        $oEmail = new Email;
37        $oEmail->address = 'david.stendardi@adenclassifieds.com';
38        $oEmail->save();
39    }
40
41    public function prepareTables()
42    {
43        $this->tables = array();
44        $this->tables[] = 'Email';
45
46        parent :: prepareTables();
47    }
48
49    public function testTicket()
50    {
51      $q = new Doctrine_Query();
52
53      try {
54          // simple query with deep relations
55          $q->update('Email')
56              ->set('address', '?', 'new@doctrine.org')
57              ->where('address = ?', 'david.stendardi@adenclassifieds.com')
58              ->execute();
59      } catch (Exception $e) {
60        $this->fail('Query :: set do not support values containing dot. Exception: ' . $e->getMessage());
61      }
62    }
63}