Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
097adf51
Commit
097adf51
authored
Feb 15, 2007
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrating test cases to be PHP 5.2 compliant
parent
bb1cf022
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
61 additions
and
5 deletions
+61
-5
ConnectionTestCase.php
tests/ConnectionTestCase.php
+1
-1
MysqlTestCase.php
tests/Export/MysqlTestCase.php
+26
-1
MultiJoinTestCase.php
tests/Query/MultiJoinTestCase.php
+31
-2
ReferenceModelTestCase.php
tests/Query/ReferenceModelTestCase.php
+2
-0
AccessTestCase.php
tests/Relation/AccessTestCase.php
+1
-1
No files found.
tests/ConnectionTestCase.php
View file @
097adf51
...
...
@@ -130,7 +130,7 @@ class Doctrine_Connection_TestCase extends Doctrine_UnitTestCase {
$this
->
conn
->
exec
(
'DROP TABLE entity'
);
}
public
function
testGetManager
()
{
$this
->
assert
Equal
(
$this
->
connection
->
getManager
(),
$this
->
manager
);
$this
->
assert
True
(
$this
->
connection
->
getManager
()
===
$this
->
manager
);
}
public
function
testDelete
()
{
$user
=
$this
->
connection
->
create
(
'User'
);
...
...
tests/Export/MysqlTestCase.php
View file @
097adf51
...
...
@@ -259,6 +259,31 @@ class Doctrine_Export_Mysql_TestCase extends Doctrine_UnitTestCase
$this
->
assertEqual
(
$this
->
adapter
->
pop
(),
'CREATE TABLE mysql_index_test_record (id BIGINT AUTO_INCREMENT, name TEXT, code INT, content TEXT, FULLTEXT INDEX content_idx (content), UNIQUE INDEX namecode_idx (name, code), PRIMARY KEY(id)) ENGINE = MYISAM'
);
}
public
function
testExportSupportsForeignKeys
()
{
$r
=
new
MysqlForeignKeyTest
;
//print $this->adapter->pop();
//$this->assertEqual($this->adapter->pop());
}
}
class
MysqlForeignKeyTest
extends
Doctrine_Record
{
public
function
setTableDefinition
()
{
$this
->
hasColumn
(
'name'
,
'string'
,
null
);
$this
->
hasColumn
(
'code'
,
'integer'
,
4
);
$this
->
hasColumn
(
'content'
,
'string'
,
4000
);
$this
->
hasColumn
(
'parent_id'
,
'integer'
);
$this
->
foreignKey
(
array
(
'local'
=>
'id'
,
'foreign'
=>
'parent_id'
,
'foreignTable'
=>
'mysql_foreign_key_test'
,
'onDelete'
=>
'CASCADE'
)
);
$this
->
option
(
'type'
,
'INNODB'
);
}
}
class
MysqlIndexTestRecord
extends
Doctrine_Record
{
...
...
@@ -283,7 +308,7 @@ class MysqlTestRecord extends Doctrine_Record
$this
->
hasColumn
(
'name'
,
'string'
,
null
,
'primary'
);
$this
->
hasColumn
(
'code'
,
'integer'
,
null
,
'primary'
);
$this
->
option
(
'
engin
e'
,
'INNODB'
);
$this
->
option
(
'
typ
e'
,
'INNODB'
);
}
}
?>
tests/Query/MultiJoinTestCase.php
View file @
097adf51
<?php
/*
* $Id$
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* This software consists of voluntary contributions made by many individuals
* and is licensed under the LGPL. For more information, see
* <http://www.phpdoctrine.com>.
*/
/**
* Doctrine_Query_MultiJoin_TestCase
*
* @package Doctrine
* @author Konsta Vesterinen <kvesteri@cc.hut.fi>
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @category Object Relational Mapping
* @link www.phpdoctrine.com
* @since 1.0
* @version $Revision$
*/
class
Doctrine_Query_MultiJoin_TestCase
extends
Doctrine_UnitTestCase
{
public
function
testInitializeData
()
{
$query
=
new
Doctrine_Query
(
$this
->
connection
);
...
...
tests/Query/ReferenceModelTestCase.php
View file @
097adf51
...
...
@@ -10,6 +10,8 @@ class Doctrine_Query_ReferenceModel_TestCase extends Doctrine_UnitTestCase {
parent
::
prepareTables
();
$this
->
connection
->
clear
();
}
public
function
prepareData
()
{
}
public
function
testInitializeData
()
{
$query
=
new
Doctrine_Query
(
$this
->
connection
);
...
...
tests/Relation/AccessTestCase.php
View file @
097adf51
...
...
@@ -70,7 +70,7 @@ class Doctrine_Relation_Access_TestCase extends Doctrine_UnitTestCase {
}
public
function
prepareTables
()
{
$this
->
tables
=
array
(
"MyUser"
,
$this
->
tables
+
=
array
(
"MyUser"
,
"MyOneThing"
,
"MyUserOneThing"
,
"MyOtherThing"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment