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
514d67ef
Commit
514d67ef
authored
May 27, 2007
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--no commit message
--no commit message
parent
f8893f27
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
8 deletions
+7
-8
ConnectionTestCase.php
tests/ConnectionTestCase.php
+5
-5
PessimisticLockingTestCase.php
tests/PessimisticLockingTestCase.php
+2
-3
No files found.
tests/ConnectionTestCase.php
View file @
514d67ef
...
...
@@ -135,7 +135,7 @@ class Doctrine_Connection_TestCase extends Doctrine_UnitTestCase {
}
public
function
testDelete
()
{
$user
=
$this
->
connection
->
create
(
'User'
);
$this
->
connection
->
delete
(
$user
);
$this
->
connection
->
unitOfWork
->
delete
(
$user
);
$this
->
assertEqual
(
$user
->
state
(),
Doctrine_Record
::
STATE_TCLEAN
);
}
public
function
testGetTable
()
{
...
...
@@ -185,15 +185,15 @@ class Doctrine_Connection_TestCase extends Doctrine_UnitTestCase {
$this
->
assertEqual
(
$this
->
connection
->
transaction
->
getTransactionLevel
(),
0
);
$this
->
connection
->
beginTransaction
();
$this
->
assertEqual
(
$this
->
connection
->
transaction
->
getTransactionLevel
(),
1
);
$this
->
assertEqual
(
$this
->
connection
->
transaction
->
getState
(),
Doctrine_Transaction
::
STATE_ACTIVE
);
$this
->
assertEqual
(
$this
->
connection
->
transaction
->
getState
(),
Doctrine_Transaction
::
STATE_ACTIVE
);
$this
->
connection
->
beginTransaction
();
$this
->
assertEqual
(
$this
->
connection
->
transaction
->
getState
(),
Doctrine_Transaction
::
STATE_BUSY
);
$this
->
assertEqual
(
$this
->
connection
->
transaction
->
getState
(),
Doctrine_Transaction
::
STATE_BUSY
);
$this
->
assertEqual
(
$this
->
connection
->
transaction
->
getTransactionLevel
(),
2
);
$this
->
connection
->
commit
();
$this
->
assertEqual
(
$this
->
connection
->
transaction
->
getState
(),
Doctrine_Transaction
::
STATE_ACTIVE
);
$this
->
assertEqual
(
$this
->
connection
->
transaction
->
getState
(),
Doctrine_Transaction
::
STATE_ACTIVE
);
$this
->
assertEqual
(
$this
->
connection
->
transaction
->
getTransactionLevel
(),
1
);
$this
->
connection
->
commit
();
$this
->
assertEqual
(
$this
->
connection
->
transaction
->
getState
(),
Doctrine_Transaction
::
STATE_SLEEP
);
$this
->
assertEqual
(
$this
->
connection
->
transaction
->
getState
(),
Doctrine_Transaction
::
STATE_SLEEP
);
$this
->
assertEqual
(
$this
->
connection
->
transaction
->
getTransactionLevel
(),
0
);
}
}
...
...
tests/PessimisticLockingTestCase.php
View file @
514d67ef
...
...
@@ -38,8 +38,7 @@ class Doctrine_PessimisticLocking_TestCase extends Doctrine_UnitTestCase {
*
* Creates a locking manager and a test record to work with.
*/
public
function
setUp
()
{
parent
::
setUp
();
public
function
testInitData
()
{
$this
->
lockingManager
=
new
Doctrine_Locking_Manager_Pessimistic
(
$this
->
connection
);
// Create sample data to test on
...
...
@@ -97,7 +96,7 @@ class Doctrine_PessimisticLocking_TestCase extends Doctrine_UnitTestCase {
$released
=
$this
->
lockingManager
->
releaseAgedLocks
(
-
1
,
'Forum_Entry'
,
'romanb'
);
// should release the lock
$this
->
assertEqual
(
1
,
$released
);
}
/**
* Tests the retrieving of a lock's owner.
* This test implicitly tests getLock().
...
...
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