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
6825767c
Commit
6825767c
authored
Oct 18, 2007
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed deprecated schema test case
parent
1ddd4f5d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
208 deletions
+2
-208
SchemaTestCase.php
tests/SchemaTestCase.php
+0
-202
SearchTestCase.php
tests/SearchTestCase.php
+1
-3
run.php
tests/run.php
+1
-3
No files found.
tests/SchemaTestCase.php
deleted
100644 → 0
View file @
1ddd4f5d
<?php
/**
* SchemaTestCase.php - 24.8.2006 1.18.54
*
* @author Jukka Hassinen <Jukka.Hassinen@BrainAlliance.com>
* @version $Id$
* @package Doctrine
*/
class
Doctrine_Schema_TestCase
extends
Doctrine_UnitTestCase
{
public
function
testEverySchemaObjectIsThrowingExceptionOnNonPropertyAssignment
()
{
$isException
=
false
;
$obj
=
new
Doctrine_Schema
();
try
{
$obj
->
no_such_property
=
'this should throw an exception'
;
}
catch
(
Doctrine_Schema_Exception
$e
)
{
$isException
=
true
;
}
$this
->
assertTrue
(
$isException
);
$isException
=
false
;
$obj
=
new
Doctrine_Schema_Database
();
try
{
$obj
->
no_such_property
=
'this should throw an exception'
;
}
catch
(
Doctrine_Schema_Exception
$e
)
{
$isException
=
true
;
}
$this
->
assertTrue
(
$isException
);
$isException
=
false
;
$obj
=
new
Doctrine_Schema_Table
();
try
{
$obj
->
no_such_property
=
'this should throw an exception'
;
}
catch
(
Doctrine_Schema_Exception
$e
)
{
$isException
=
true
;
}
$this
->
assertTrue
(
$isException
);
$isException
=
false
;
$obj
=
new
Doctrine_Schema_Column
();
try
{
$obj
->
no_such_property
=
'this should throw an exception'
;
}
catch
(
Doctrine_Schema_Exception
$e
)
{
$isException
=
true
;
}
$this
->
assertTrue
(
$isException
);
$isException
=
false
;
$obj
=
new
Doctrine_Schema_Relation
();
try
{
$obj
->
no_such_property
=
'this should throw an exception'
;
}
catch
(
Doctrine_Schema_Exception
$e
)
{
$isException
=
true
;
}
$this
->
assertTrue
(
$isException
);
}
public
function
testEverySchemaObjectIsThrowingExceptionOnNonPropertyAccess
()
{
$isException
=
false
;
$obj
=
new
Doctrine_Schema
();
try
{
$value
=
$obj
->
no_such_property
;
}
catch
(
Doctrine_Schema_Exception
$e
)
{
$isException
=
true
;
}
$this
->
assertTrue
(
$isException
);
$isException
=
false
;
$obj
=
new
Doctrine_Schema_Database
();
try
{
$value
=
$obj
->
no_such_property
;
}
catch
(
Doctrine_Schema_Exception
$e
)
{
$isException
=
true
;
}
$this
->
assertTrue
(
$isException
);
$isException
=
false
;
$obj
=
new
Doctrine_Schema_Table
();
try
{
$value
=
$obj
->
no_such_property
;
}
catch
(
Doctrine_Schema_Exception
$e
)
{
$isException
=
true
;
}
$this
->
assertTrue
(
$isException
);
$isException
=
false
;
$obj
=
new
Doctrine_Schema_Column
();
try
{
$value
=
$obj
->
no_such_property
;
}
catch
(
Doctrine_Schema_Exception
$e
)
{
$isException
=
true
;
}
$this
->
assertTrue
(
$isException
);
$isException
=
false
;
$obj
=
new
Doctrine_Schema_Relation
();
try
{
$value
=
$obj
->
no_such_property
;
}
catch
(
Doctrine_Schema_Exception
$e
)
{
$isException
=
true
;
}
$this
->
assertTrue
(
$isException
);
}
public
function
testSchemaDatabasePropertiesAreAssignableAndAccessible
()
{
$obj
=
new
Doctrine_Schema_Database
();
$vars
=
array
(
'name'
=>
'mydatabase'
,
'type'
=>
'MySQL'
,
'version'
=>
'5.0'
,
'engine'
=>
'InnoDB'
,
'charset'
=>
'UTF-8'
);
foreach
(
$vars
as
$key
=>
$val
)
{
$obj
->
$key
=
$val
;
$this
->
assertEqual
(
$obj
->
$key
,
$val
);
}
}
public
function
testSchemaTablePropertiesAreAssignableAndAccessible
()
{
$obj
=
new
Doctrine_Schema_Table
();
$vars
=
array
(
'name'
=>
'User'
,
'check'
=>
'(col1 < col2)'
,
'charset'
=>
'UTF-8'
,
'description'
=>
'User data'
);
foreach
(
$vars
as
$key
=>
$val
)
{
$obj
->
$key
=
$val
;
$this
->
assertEqual
(
$obj
->
$key
,
$val
);
}
}
public
function
testSchemaColumnPropertiesAreAssignableAndAccessible
()
{
$obj
=
new
Doctrine_Schema_Column
();
$vars
=
array
(
'name'
=>
'id'
,
'type'
=>
'int'
,
'length'
=>
10
,
'autoinc'
=>
true
,
'default'
=>
null
,
'notnull'
=>
true
,
// 'description' => 'user id',
// 'check' => 'id > 0',
// 'charset' => 'UTF-8'
);
foreach
(
$vars
as
$key
=>
$val
)
{
$obj
->
$key
=
$val
;
$this
->
assertEqual
(
$obj
->
$key
,
$val
);
}
}
public
function
testSchemaDatabaseIsCloneable
()
{
}
public
function
testSchemaIsTraversable
()
{
/* @todo complete
$schema = new Doctrine_Schema();
foreach($schema as $key => $db)
{
$this->assertEqual($db->name, $key);
foreach($db as $key => $table)
{
$this->assertEqual($table->name, $key);
foreach($table as $key => $col)
{
$this->assertEqual($col->name, $key);
}
}
}
*/
}
}
tests/SearchTestCase.php
View file @
6825767c
...
...
@@ -145,9 +145,7 @@ class Doctrine_Search_TestCase extends Doctrine_UnitTestCase
public
function
testBatchUpdatesUpdateAllPendingEntries
()
{
$e
=
new
SearchTest
();
$tpl
=
$e
->
getTable
()
->
getTemplate
(
'Doctrine_Template_Searchable'
);
$tpl
->
getPlugin
()
->
processPending
();
$e
->
batchUpdateIndex
();
$coll
=
Doctrine_Query
::
create
()
->
from
(
'SearchTestIndex s'
)
...
...
tests/run.php
View file @
6825767c
...
...
@@ -211,9 +211,6 @@ $record->addTestCase(new Doctrine_Record_ZeroValues_TestCase());
//$record->addTestCase(new Doctrine_Record_SaveBlankRecord_TestCase());
$test
->
addTestCase
(
$record
);
$test
->
addTestCase
(
new
Doctrine_Schema_TestCase
());
$test
->
addTestCase
(
new
Doctrine_CustomPrimaryKey_TestCase
());
$test
->
addTestCase
(
new
Doctrine_CustomResultSetOrder_TestCase
());
...
...
@@ -240,6 +237,7 @@ $test->addTestCase(new Doctrine_NestedSet_SingleRoot_TestCase());
$search
=
new
GroupTest
(
'Search tests'
,
'search'
);
$search
->
addTestCase
(
new
Doctrine_Search_TestCase
());
$search
->
addTestCase
(
new
Doctrine_Search_Query_TestCase
());
$search
->
addTestCase
(
new
Doctrine_Search_File_TestCase
());
$test
->
addTestCase
(
$search
);
...
...
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