Commit 50919a79 authored by catch's avatar catch
Browse files

Issue #2003342 by jhedstrom: Convert system module's database unit tests to phpunit.

parent 7166d890
...@@ -5,16 +5,16 @@ ...@@ -5,16 +5,16 @@
* Definition of Drupal\system\Tests\Database\EmptyStatementTest. * Definition of Drupal\system\Tests\Database\EmptyStatementTest.
*/ */
namespace Drupal\system\Tests\Database; namespace Drupal\Tests\Core\Database;
use Drupal\Core\Database\StatementEmpty; use Drupal\Core\Database\StatementEmpty;
use Drupal\Core\Database\StatementInterface; use Drupal\Core\Database\StatementInterface;
use Drupal\simpletest\UnitTestBase; use Drupal\Tests\UnitTestCase;
/** /**
* Tests the empty pseudo-statement class. * Tests the empty pseudo-statement class.
*/ */
class EmptyStatementTest extends UnitTestBase { class EmptyStatementTest extends UnitTestCase {
public static function getInfo() { public static function getInfo() {
return array( return array(
'name' => 'Empty statement', 'name' => 'Empty statement',
...@@ -43,8 +43,6 @@ function testEmptyIteration() { ...@@ -43,8 +43,6 @@ function testEmptyIteration() {
$this->fail('Iterating empty result set should not iterate.'); $this->fail('Iterating empty result set should not iterate.');
return; return;
} }
$this->pass('Iterating empty result set skipped iteration.');
} }
/** /**
...@@ -53,6 +51,6 @@ function testEmptyIteration() { ...@@ -53,6 +51,6 @@ function testEmptyIteration() {
function testEmptyFetchAll() { function testEmptyFetchAll() {
$result = new StatementEmpty(); $result = new StatementEmpty();
$this->assertEqual($result->fetchAll(), array(), 'Empty array returned from empty result set.'); $this->assertEquals($result->fetchAll(), array(), 'Empty array returned from empty result set.');
} }
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment