Skip to content

Commit

Permalink
Fix some skipped tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cristianoc72 committed Jul 23, 2012
1 parent c1cdd7e commit 4e6e5c7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 16 deletions.
6 changes: 3 additions & 3 deletions tests/Propel/Tests/Helpers/Schemas/SchemasTestBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ abstract class SchemasTestBase extends \PHPUnit_Framework_TestCase
{
public static function setUpBeforeClass()
{
if (file_exists(dirname(__FILE__) . '/../../../../Fixtures/schemas/build/conf/bookstore-conf.php')) {
Propel::init(dirname(__FILE__) . '/../../../../Fixtures/schemas/build/conf/bookstore-conf.php');
if (file_exists(dirname(__FILE__) . '/../../../../Fixtures/schemas/build/conf/bookstore-schemas-conf.php')) {
Propel::init(dirname(__FILE__) . '/../../../../Fixtures/schemas/build/conf/bookstore-schemas-conf.php');
}
}

protected function setUp()
{
if (!file_exists(dirname(__FILE__) . '/../../../../Fixtures/schemas/build/conf/bookstore-conf.php')) {
if (!file_exists(dirname(__FILE__) . '/../../../../Fixtures/schemas/build/conf/bookstore-schemas-conf.php')) {
$this->markTestSkipped('You must build the schemas project for this tests to run');
}
}
Expand Down
20 changes: 7 additions & 13 deletions tests/Propel/Tests/Runtime/Adapter/Pdo/MysqlAdapterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,18 @@ public static function getConParams()
);
}

protected function setUp() {
parent::setUp();
if (version_compare(PHP_VERSION, '5.3.6', '<')) {
$this->setExpectedException('Propel\Runtime\Exception\PropelException');
}
}

/**
* @dataProvider getConParams
* @expectedException PropelException
*/
public function testPrepareParamsThrowsException($conparams)
{
if (version_compare(PHP_VERSION, '5.3.6', '>=')) {
$this->markTestSkipped('PHP_VERSION >= 5.3.6, no need to throw an exception.');
}

$db = new TestableMysqlAdapter();
$db->prepareParams($conparams);
}
Expand All @@ -56,10 +58,6 @@ public function testPrepareParamsThrowsException($conparams)
*/
public function testPrepareParams($conparams)
{
if (version_compare(PHP_VERSION, '5.3.6', '<')) {
$this->markTestSkipped('PHP_VERSION < 5.3.6 will throw an exception.');
}

$db = new TestableMysqlAdapter();
$params = $db->prepareParams($conparams);

Expand All @@ -73,10 +71,6 @@ public function testPrepareParams($conparams)
*/
public function testNoSetNameQueryExecuted($conparams)
{
if (version_compare(PHP_VERSION, '5.3.6', '<')) {
$this->markTestSkipped('PHP_VERSION < 5.3.6 will throw an exception.');
}

$db = new TestableMysqlAdapter();
$params = $db->prepareParams($conparams);

Expand Down

0 comments on commit 4e6e5c7

Please sign in to comment.