Skip to content

Commit

Permalink
Fixed an oversight where fixtureMethodCheck was through an ErrorExcep…
Browse files Browse the repository at this point in the history
…tion purely because testFix was not a PHPUnit_Fixture_DynamicDB.
  • Loading branch information
baphled committed Dec 17, 2008
1 parent eb9a38a commit 2782985
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/unit/phpunit_fixture/FixturesManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
}
Expand All @@ -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 ();
Expand Down Expand Up @@ -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() {
Expand Down

0 comments on commit 2782985

Please sign in to comment.