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
be34a396
Commit
be34a396
authored
Jun 07, 2007
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--no commit message
--no commit message
parent
f2895955
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
10 deletions
+17
-10
AuditLogTestCase.php
tests/AuditLogTestCase.php
+17
-10
No files found.
tests/AuditLogTestCase.php
View file @
be34a396
...
...
@@ -38,22 +38,29 @@ class Doctrine_AuditLog_TestCase extends Doctrine_UnitTestCase
{
}
public
function
testVersionTableSqlReturnsProperQuery
()
{
$table
=
$this
->
conn
->
getTable
(
'Entity'
);
$table
=
$this
->
conn
->
getTable
(
'Versionable'
);
$auditLog
=
$table
->
getAuditLog
();
$auditLog
=
new
Doctrine_AuditLog
(
$table
);
$auditLog
->
audit
();
$entity
=
new
Entity
();
$entity
=
new
Versionable
();
$entity
->
name
=
'zYne'
;
$entity
->
password
=
'secret'
;
$entity
->
save
();
$this
->
assertEqual
(
$entity
->
version
,
1
);
$entity
->
name
=
'zYne 2'
;
$entity
->
save
();
$entity
->
EntityVersion
;
$this
->
assertEqual
(
$entity
->
version
,
2
);
$entity
->
delete
();
$this
->
assertEqual
(
$entity
->
version
,
3
);
$entity
->
revert
(
2
);
$this
->
assertEqual
(
$entity
->
name
,
'zYne 2'
);
}
public
function
testUpdateTriggerSqlReturnsProperQuery
()
{
...
...
@@ -73,7 +80,7 @@ class Doctrine_AuditLog_TestCase extends Doctrine_UnitTestCase
$sql
=
$auditLog
->
deleteTriggerSql
(
$table
);
$this
->
assertEqual
(
$sql
,
'CREATE TRIGGER entity_ddt DELETE ON entity BEGIN INSERT INTO entity_dvt (id, name, loginname, password, type, created, updated, email_id) VALUES (old.id, old.name, old.loginname, old.password, old.type, old.created, old.updated, old.email_id); END;'
);
$this
->
assertEqual
(
$sql
,
'CREATE TRIGGER entity_ddt
BEFORE
DELETE ON entity BEGIN INSERT INTO entity_dvt (id, name, loginname, password, type, created, updated, email_id) VALUES (old.id, old.name, old.loginname, old.password, old.type, old.created, old.updated, old.email_id); END;'
);
}
}
class
Versionable
extends
Doctrine_Record
...
...
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