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
47ffde10
Commit
47ffde10
authored
May 30, 2009
by
jwage
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[2.0] Fixing getConnection() to use the new dropAndCreateDatabase()
parent
d34a05a2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
11 deletions
+3
-11
TestUtil.php
tests/Doctrine/Tests/TestUtil.php
+3
-11
No files found.
tests/Doctrine/Tests/TestUtil.php
View file @
47ffde10
...
...
@@ -22,21 +22,13 @@ class TestUtil
'memory'
=>
true
);
}
$conn
=
\Doctrine\DBAL\DriverManager
::
getConnection
(
$params
);
$sm
=
$conn
->
getSchemaManager
();
try
{
$sm
->
dropDatabase
();
}
catch
(
\Exception
$e
)
{}
try
{
$sm
->
createDatabase
();
}
catch
(
\Exception
$e
)
{}
$conn
=
\Doctrine\DBAL\DriverManager
::
getConnection
(
$params
);
$conn
->
getSchemaManager
()
->
dropAndCreateDatabase
();
$conn
->
close
();
$conn
->
connect
();
$conn
=
\Doctrine\DBAL\DriverManager
::
getConnection
(
$params
);
return
$conn
;
}
}
\ No newline at end of file
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