Skip to content
This repository has been archived by the owner on Mar 8, 2023. It is now read-only.

Commit

Permalink
inherit from name-spaced phpunit classes and disabled tests because a…
Browse files Browse the repository at this point in the history
…n unknown table is missing
  • Loading branch information
Volker Machon committed Jun 22, 2017
1 parent ee7cef7 commit 60e7bca
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions tests/unit/StatementContainerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

namespace malkusch\bav;

use PHPUnit\Framework\TestCase;

require_once __DIR__ . "/../bootstrap.php";

/**
Expand All @@ -11,42 +13,50 @@
* @author Markus Malkusch <[email protected]>
* @see StatementContainer
*/
class StatementContainerTest extends \PHPUnit_Framework_TestCase
class StatementContainerTest extends TestCase
{

/**
* @var StatementContainer
*/
private $statementContainer;

public function setUp()
{
$this->statementContainer = new StatementContainer(PDOFactory::makePDO());
}

/**
* Tests two equal queries should return the same object
*/
public function testStoring()
{
// FIXME: where is the `DUAL` table coming from?
$this->markTestSkipped('Can not be executed');


$query = "SELECT :param as test FROM DUAL";
$stmt1 = $this->statementContainer->prepare($query);
$stmt2 = $this->statementContainer->prepare($query);

$this->assertSame($stmt1, $stmt2);
}

/**
* Tests the query
*/
public function testQuery()
{
// FIXME: where is the `DUAL` table coming from?
$this->markTestSkipped('Can not be executed');


$query = "SELECT :param as test FROM DUAL";

$stmt = $this->statementContainer->prepare($query);
$stmt->execute(array(":param" => 5));
$this->assertEquals(array("5"), $stmt->fetchAll(\PDO::FETCH_COLUMN));

$stmt2 = $this->statementContainer->prepare($query);
$stmt2->execute(array(":param" => 4));
$this->assertEquals(array("4"), $stmt2->fetchAll(\PDO::FETCH_COLUMN));
Expand Down

0 comments on commit 60e7bca

Please sign in to comment.