Permalink
Browse files

Fixed an oversight where fixtureMethodCheck was through an ErrorExcep…

…tion purely because testFix was not a PHPUnit_Fixture_DynamicDB.
  • Loading branch information...
1 parent eb9a38a commit 2782985a34992759e2d6dbb324bfcd04f88aa8af @baphled committed Dec 17, 2008
Showing with 3 additions and 1 deletion.
  1. +3 −1 tests/unit/phpunit_fixture/FixturesManagerTest.php
@@ -117,6 +117,7 @@ public function setUp() {
$this->_fixWrap = new FixturesManWrapper();
$this->_dummyDynamic = new DummyDynamicFixture('development');
$this->_testFixture = new TestFixture();
+ $this->_dbTestFixture = new DbTestFixture();
$this->_invalidFixture = new InvalidFieldTypeFixture();
$this->_fixManStub = $this->getMock('FixtureManager',array('setupTable','buildSchema', 'truncateTable', 'tablesPresent', 'tableExists', 'insertTestData', 'runFixtureQuery','dropTable','dropTables','fixtureMethodCheck'));
}
@@ -132,6 +133,7 @@ public function tearDown() {
$this->_fixMan = null;
$this->_fixWrap = null;
$this->_fixManStub = null;
+ $this->_dbTestFixture = null;
$this->_testFixture = null;
$this->_invalidFixture = null;
parent::tearDown ();
@@ -895,7 +897,7 @@ function testTruncateTableReturnsFalseIfFailsToTruncate() {
*/
function testFixureMethodCheckThrowsExceptionIfInvalidCall() {
$this->setExpectedException('ErrorException');
- $this->_fixturesManager->fixtureMethodCheck('blah',$this->_testFixture);
+ $this->_fixturesManager->fixtureMethodCheck('blah', $this->_dbTestFixture);
}
function testFixtureMethodCheckThrowsExceptionIfFixtureIsNotOfExpectedType() {

0 comments on commit 2782985

Please sign in to comment.