Skip to content

Commit dab01cc

Browse files
johnkaryjwage
authored andcommitted
Change EOL from CRLF to LF for consistency
1 parent e3ae69c commit dab01cc

File tree

3 files changed

+207
-207
lines changed

3 files changed

+207
-207
lines changed

tests/Ticket/2158TestCase.php

Lines changed: 55 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,56 @@
1-
<?php
2-
3-
class Doctrine_Ticket_2158_TestCase extends Doctrine_UnitTestCase
4-
{
5-
public function prepareTables()
6-
{
7-
$this->tables[] = "T2158_Model1";
8-
$this->tables[] = "T2158_Model2";
9-
parent::prepareTables();
10-
}
11-
12-
public function prepareData()
13-
{
14-
$this->myModel = new T2158_Model1();
15-
$this->myModel->save();
16-
}
17-
18-
public function testInit()
19-
{
20-
21-
}
22-
23-
// This produces a failing test
24-
public function testTest()
25-
{
26-
$q = Doctrine_Core::getTable('T2158_Model2')->createQuery('m2')->leftJoin('m2.Relation m1 ON m2.id = m1.m2_id');
27-
$this->assertEqual($q->getSqlQuery(), 'SELECT t.id AS t__id, t2.id AS t2__id, t2.title AS t2__title, t2.m2_id AS t2__m2_id FROM t2158__model2 t LEFT JOIN t2158__model1 t2 ON (t.id = t2.m2_id)');
28-
//$rs = $q->execute();
29-
}
30-
}
31-
32-
class T2158_Model1 extends Doctrine_Record
33-
{
34-
public function setTableDefinition()
35-
{
36-
$this->hasColumn('title', 'string');
37-
$this->hasColumn('m2_id', 'integer');
38-
}
39-
}
40-
41-
class T2158_Model2 extends Doctrine_Record
42-
{
43-
public function setTableDefinition()
44-
{
45-
}
46-
47-
48-
public function setUp()
49-
{
50-
$this->hasMany('T2158_Model1 as Relation', array(
51-
'local' => 'id',
52-
'foreign' => 'm2_id'
53-
)
54-
);
55-
}
1+
<?php
2+
3+
class Doctrine_Ticket_2158_TestCase extends Doctrine_UnitTestCase
4+
{
5+
public function prepareTables()
6+
{
7+
$this->tables[] = "T2158_Model1";
8+
$this->tables[] = "T2158_Model2";
9+
parent::prepareTables();
10+
}
11+
12+
public function prepareData()
13+
{
14+
$this->myModel = new T2158_Model1();
15+
$this->myModel->save();
16+
}
17+
18+
public function testInit()
19+
{
20+
21+
}
22+
23+
// This produces a failing test
24+
public function testTest()
25+
{
26+
$q = Doctrine_Core::getTable('T2158_Model2')->createQuery('m2')->leftJoin('m2.Relation m1 ON m2.id = m1.m2_id');
27+
$this->assertEqual($q->getSqlQuery(), 'SELECT t.id AS t__id, t2.id AS t2__id, t2.title AS t2__title, t2.m2_id AS t2__m2_id FROM t2158__model2 t LEFT JOIN t2158__model1 t2 ON (t.id = t2.m2_id)');
28+
//$rs = $q->execute();
29+
}
30+
}
31+
32+
class T2158_Model1 extends Doctrine_Record
33+
{
34+
public function setTableDefinition()
35+
{
36+
$this->hasColumn('title', 'string');
37+
$this->hasColumn('m2_id', 'integer');
38+
}
39+
}
40+
41+
class T2158_Model2 extends Doctrine_Record
42+
{
43+
public function setTableDefinition()
44+
{
45+
}
46+
47+
48+
public function setUp()
49+
{
50+
$this->hasMany('T2158_Model1 as Relation', array(
51+
'local' => 'id',
52+
'foreign' => 'm2_id'
53+
)
54+
);
55+
}
5656
}

tests/Ticket/2251TestCase.php

Lines changed: 86 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -1,87 +1,87 @@
1-
<?php
2-
/*
3-
* $Id: 2229TestCase.php 5871 2009-06-10 08:46:00Z Garfield-fr $
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_2251_TestCase
24-
*
25-
* @package Doctrine
26-
* @author Daniel Cousineau <[email protected]>
27-
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
28-
* @category Object Relational Mapping
29-
* @link www.doctrine-project.org
30-
* @since 1.0
31-
* @version $Revision$
32-
*/
33-
class Doctrine_Ticket_2251_TestCase extends Doctrine_UnitTestCase
34-
{
35-
public function prepareTables()
36-
{
37-
$this->tables[] = 'Ticket_2251_TestStringLength';
38-
parent::prepareTables();
39-
}
40-
41-
public function testEmptyStringLengthSQLExport()
42-
{
43-
$drivers = array(
44-
'mysql',
45-
'sqlite',
46-
'pgsql',
47-
'oracle',
48-
'mssql'
49-
);
50-
51-
$expected = array(
52-
'mysql' => 'CREATE TABLE test_string_length (id BIGINT AUTO_INCREMENT, test_string TEXT, PRIMARY KEY(id)) ENGINE = INNODB',
53-
'sqlite' => 'CREATE TABLE test_string_length (id INTEGER PRIMARY KEY AUTOINCREMENT, test_string TEXT)',
54-
'pgsql' => 'CREATE TABLE test_string_length (id BIGSERIAL, test_string TEXT, PRIMARY KEY(id))',
55-
'oracle' => 'CREATE TABLE test_string_length (id NUMBER(20), test_string CLOB, PRIMARY KEY(id))',
56-
'mssql' => 'CREATE TABLE test_string_length (id INT NOT NULL identity, test_string TEXT NULL, PRIMARY KEY([id]))'
57-
);
58-
59-
foreach ($drivers as $driver)
60-
{
61-
$dbh = new Doctrine_Adapter_Mock($driver);
62-
63-
$conn = Doctrine_Manager::getInstance()->connection($dbh, $driver);
64-
65-
list($sql) = $conn->export->exportSortedClassesSql(array('Ticket_2251_TestStringLength'), false);
66-
67-
$this->assertEqual($sql, $expected[$driver]);
68-
69-
unset($conn);
70-
unset($dbh);
71-
}
72-
}
73-
}
74-
75-
class Ticket_2251_TestStringLength extends Doctrine_Record
76-
{
77-
public function setTableDefinition()
78-
{
79-
$this->setTableName('test_string_length');
80-
$this->hasColumn('test_string', 'string');
81-
}
82-
83-
public function setUp()
84-
{
85-
parent::setUp();
86-
}
1+
<?php
2+
/*
3+
* $Id: 2229TestCase.php 5871 2009-06-10 08:46:00Z Garfield-fr $
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_2251_TestCase
24+
*
25+
* @package Doctrine
26+
* @author Daniel Cousineau <[email protected]>
27+
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
28+
* @category Object Relational Mapping
29+
* @link www.doctrine-project.org
30+
* @since 1.0
31+
* @version $Revision$
32+
*/
33+
class Doctrine_Ticket_2251_TestCase extends Doctrine_UnitTestCase
34+
{
35+
public function prepareTables()
36+
{
37+
$this->tables[] = 'Ticket_2251_TestStringLength';
38+
parent::prepareTables();
39+
}
40+
41+
public function testEmptyStringLengthSQLExport()
42+
{
43+
$drivers = array(
44+
'mysql',
45+
'sqlite',
46+
'pgsql',
47+
'oracle',
48+
'mssql'
49+
);
50+
51+
$expected = array(
52+
'mysql' => 'CREATE TABLE test_string_length (id BIGINT AUTO_INCREMENT, test_string TEXT, PRIMARY KEY(id)) ENGINE = INNODB',
53+
'sqlite' => 'CREATE TABLE test_string_length (id INTEGER PRIMARY KEY AUTOINCREMENT, test_string TEXT)',
54+
'pgsql' => 'CREATE TABLE test_string_length (id BIGSERIAL, test_string TEXT, PRIMARY KEY(id))',
55+
'oracle' => 'CREATE TABLE test_string_length (id NUMBER(20), test_string CLOB, PRIMARY KEY(id))',
56+
'mssql' => 'CREATE TABLE test_string_length (id INT NOT NULL identity, test_string TEXT NULL, PRIMARY KEY([id]))'
57+
);
58+
59+
foreach ($drivers as $driver)
60+
{
61+
$dbh = new Doctrine_Adapter_Mock($driver);
62+
63+
$conn = Doctrine_Manager::getInstance()->connection($dbh, $driver);
64+
65+
list($sql) = $conn->export->exportSortedClassesSql(array('Ticket_2251_TestStringLength'), false);
66+
67+
$this->assertEqual($sql, $expected[$driver]);
68+
69+
unset($conn);
70+
unset($dbh);
71+
}
72+
}
73+
}
74+
75+
class Ticket_2251_TestStringLength extends Doctrine_Record
76+
{
77+
public function setTableDefinition()
78+
{
79+
$this->setTableName('test_string_length');
80+
$this->hasColumn('test_string', 'string');
81+
}
82+
83+
public function setUp()
84+
{
85+
parent::setUp();
86+
}
8787
}

0 commit comments

Comments
 (0)