Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
Merge pull request zendframework/zendframework#836 from Maks3w/hotfix…
Browse files Browse the repository at this point in the history
…/ZF2-176

[ZF2-176] Replace all assertType assertions.
  • Loading branch information
Pádraic Brady committed Feb 25, 2012
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions test/DbStatementTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,31 +54,31 @@ public function testCreateSelectStatementWithRows()

$stmt = Test\DbStatement::createSelectStatement($rows);

$this->assertType('Zend\Test\DbStatement', $stmt);
$this->assertInstanceOf('Zend\Test\DbStatement', $stmt);
$this->assertEquals($rows, $stmt->fetchAll());
}

public function testCreateInsertStatementWithRowCount()
{
$stmt = Test\DbStatement::createInsertStatement(1234);

$this->assertType('Zend\Test\DbStatement', $stmt);
$this->assertInstanceOf('Zend\Test\DbStatement', $stmt);
$this->assertEquals(1234, $stmt->rowCount());
}

public function testCreateUpdateStatementWithRowCount()
{
$stmt = Test\DbStatement::createUpdateStatement(1234);

$this->assertType('Zend\Test\DbStatement', $stmt);
$this->assertInstanceOf('Zend\Test\DbStatement', $stmt);
$this->assertEquals(1234, $stmt->rowCount());
}

public function testCreateDeleteStatementWithRowCount()
{
$stmt = Test\DbStatement::createDeleteStatement(1234);

$this->assertType('Zend\Test\DbStatement', $stmt);
$this->assertInstanceOf('Zend\Test\DbStatement', $stmt);
$this->assertEquals(1234, $stmt->rowCount());
}

Expand Down
4 changes: 2 additions & 2 deletions test/PHPUnit/Db/ConnectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function testCreateQueryTable()
$connection = $this->createConnection();
$ret = $connection->createQueryTable("foo", "foo");

$this->assertType('Zend\Test\PHPUnit\Db\DataSet\QueryTable', $ret);
$this->assertInstanceOf('Zend\Test\PHPUnit\Db\DataSet\QueryTable', $ret);
}

public function testGetSchema()
Expand All @@ -81,7 +81,7 @@ public function testGetMetaData()
$connection = $this->createConnection();
$metadata = $connection->getMetaData();

$this->assertType('Zend\Test\PHPUnit\Db\Metadata\Generic', $metadata);
$this->assertInstanceOf('Zend\Test\PHPUnit\Db\Metadata\Generic', $metadata);
}

public function testGetTruncateCommand()
Expand Down
2 changes: 1 addition & 1 deletion test/PHPUnit/Db/DataSet/DbTableDataSetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function testAddTableCreatesDbTableInstance()
$dataSet = new DataSet\DbTableDataSet();
$dataSet->addTable($table);

$this->assertType('Zend\Test\PHPUnit\Db\DataSet\DbTable', $dataSet->getTable($fixtureTable));
$this->assertInstanceOf('Zend\Test\PHPUnit\Db\DataSet\DbTable', $dataSet->getTable($fixtureTable));
}

public function testGetUnknownTableThrowsException()
Expand Down
2 changes: 1 addition & 1 deletion test/PHPUnit/Db/DataSet/QueryTableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public function testQueryTableWithoutRows()
$queryTable = new DataSet\QueryTable("foo", null, $this->connectionMock);

$metadata = $queryTable->getTableMetaData();
$this->assertType('PHPUnit_Extensions_Database_DataSet_ITableMetaData', $metadata);
$this->assertInstanceOf('PHPUnit_Extensions_Database_DataSet_ITableMetaData', $metadata);
$this->assertEquals(array(), $metadata->getColumns());
$this->assertEquals(array(), $metadata->getPrimaryKeys());
$this->assertEquals("foo", $metadata->getTableName());
Expand Down

0 comments on commit e286a21

Please sign in to comment.