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
0173d0aa
Commit
0173d0aa
authored
Sep 22, 2006
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small fix
parent
e49a686a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
5 deletions
+15
-5
Interface.php
Doctrine/DB/EventListener/Interface.php
+1
-1
DBTestCase.php
tests/DBTestCase.php
+14
-4
No files found.
Doctrine/DB/EventListener/Interface.php
View file @
0173d0aa
...
...
@@ -25,7 +25,7 @@
* @license LGPL
* @package Doctrine
*/
interface
Doctrine_DB_EventListener
{
interface
Doctrine_DB_EventListener
_Interface
{
public
function
onPreQuery
(
Doctrine_DB
$dbh
,
array
$args
);
public
function
onQuery
(
Doctrine_DB
$dbh
,
array
$args
);
...
...
tests/DBTestCase.php
View file @
0173d0aa
...
...
@@ -50,15 +50,25 @@ class Doctrine_DB_TestCase extends Doctrine_UnitTestCase {
$this
->
pass
();
}
}
public
function
testGetConnectionPdoLikeDSN
()
{
$conn
=
Doctrine_DB2
::
getConnection
(
'mysql:host=localhost;dbname=test'
,
'root'
,
'password'
);
$this
->
assertEqual
(
$conn
->
getDSN
(),
'mysql:host=localhost;dbname=test'
);
$this
->
assertEqual
(
$conn
->
getUsername
(),
'root'
);
$this
->
assertEqual
(
$conn
->
getPassword
(),
'password'
);
public
function
testGetConnection
()
{
$conn
=
Doctrine_DB2
::
getConnection
(
'sqlite::memory:'
);
$this
->
assertEqual
(
$conn
->
getDSN
(),
'sqlite::memory:'
);
$this
->
assertEqual
(
$conn
->
getUsername
(),
null
);
$this
->
assertEqual
(
$conn
->
getPassword
(),
null
);
}
public
function
testGetConnectionWithPearLikeDSN
()
{
$conn
=
Doctrine_DB2
::
getConnection
(
'mysql://zYne:password@localhost/test'
);
$this
->
assertEqual
(
$conn
->
getDSN
(),
'mysql:host=localhost;dbname=test'
);
$this
->
assertEqual
(
$conn
->
getUsername
(),
'zYne'
);
$this
->
assertEqual
(
$conn
->
getPassword
(),
'password'
);
$conn
=
Doctrine_DB2
::
getConnection
(
'sqlite://:memory:'
);
$this
->
assertEqual
(
$conn
->
getDSN
(),
'sqlite::memory:'
);
...
...
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