diff --git a/Tests/Fixtures/Model/Base/BookQuery.php b/Tests/Fixtures/Model/Base/BookQuery.php index 129bc36..33290da 100644 --- a/Tests/Fixtures/Model/Base/BookQuery.php +++ b/Tests/Fixtures/Model/Base/BookQuery.php @@ -102,7 +102,7 @@ abstract class BookQuery extends ModelCriteria * * @return ChildBook|array|mixed the result, formatted by the current formatter */ - public function findPk($key, $con = null) + public function findPk($key, ConnectionInterface $con = null) { if ($key === null) { return null; @@ -184,7 +184,7 @@ abstract class BookQuery extends ModelCriteria * * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter */ - public function findPks($keys, $con = null) + public function findPks($keys, ConnectionInterface $con = null) { if (null === $con) { $con = Propel::getServiceContainer()->getReadConnection($this->getDbName()); diff --git a/Tests/Fixtures/Model/BookQuery.php b/Tests/Fixtures/Model/BookQuery.php index b9227b9..372725a 100644 --- a/Tests/Fixtures/Model/BookQuery.php +++ b/Tests/Fixtures/Model/BookQuery.php @@ -2,8 +2,9 @@ namespace Propel\PropelBundle\Tests\Fixtures\Model; -use Propel\PropelBundle\Tests\Fixtures\Model\Base\BookQuery as BaseBookQuery; +use Propel\Runtime\Connection\ConnectionInterface; +use Propel\PropelBundle\Tests\Fixtures\Model\Base\BookQuery as BaseBookQuery; use Propel\PropelBundle\Tests\Fixtures\Model\Book; /** @@ -24,7 +25,7 @@ class BookQuery extends BaseBookQuery /** * fake for test */ - public function findPk($key, $con = null) + public function findPk($key, ConnectionInterface $con = null) { if (1 === $key) { $book = new Book(); @@ -71,7 +72,7 @@ class BookQuery extends BaseBookQuery /** * fake for test */ - public function findOne($con = null) + public function findOne(ConnectionInterface $con = null) { if (true === $this->bySlug) { $book = new Book(); diff --git a/Tests/Request/ParamConverter/PropelParamConverterTest.php b/Tests/Request/ParamConverter/PropelParamConverterTest.php index fea5b16..f610637 100644 --- a/Tests/Request/ParamConverter/PropelParamConverterTest.php +++ b/Tests/Request/ParamConverter/PropelParamConverterTest.php @@ -14,7 +14,6 @@ use Symfony\Component\Routing\RouteCollection; class PropelParamConverterTest extends TestCase { - protected $con; public function setUp() @@ -357,15 +356,12 @@ class PropelParamConverterTest extends TestCase XML; - $builder = new QuickBuilder(); - $builder->setSchema($schema); - $classTargets = null; - if (class_exists('Propel\PropelBundle\Tests\Request\ParamConverter\MyAuthor')) { - $classTargets = array(); + if (!class_exists('Propel\PropelBundle\Tests\Request\ParamConverter\MyAuthor')) { + QuickBuilder::buildSchema($schema); } - $this->con = $builder->build($dsn = null, $user = null, $pass = null, $adapter = null, $classTargets); + $this->con = Propel::getConnection('default'); $this->con->useDebug(true); MyBookQuery::create()->deleteAll($this->con);