Open Data Catalog v2.0.0
DatabaseTableTest.php
Go to the documentation of this file.
1 <?php
2 
4 
5 use Drupal\Core\Database\Connection;
6 use Drupal\Core\Database\Schema;
7 use MockChain\Chain;
9 use PHPUnit\Framework\TestCase;
10 
14 class DatabaseTableTest extends TestCase {
15 
19  public function testConstruction() {
20  $connection = (new Chain($this))
21  ->add(Connection::class, "schema", Schema::class)
22  ->add(Schema::class, 'tableExists', FALSE)
23  ->getMock();
24 
25  $databaseTable = new DatabaseTable($connection, "blah");
26  $this->assertTrue(is_object($databaseTable));
27  }
28 
29 }
Drupal\dkan_harvest\Storage\DatabaseTable
Definition: DatabaseTable.php:11
Drupal\Tests\dkan_harvest\Unit\Storage\DatabaseTableTest
Definition: DatabaseTableTest.php:14
Drupal\Tests\dkan_harvest\Unit\Storage
Definition: DatabaseTableFactoryTest.php:3
Drupal\Tests\dkan_harvest\Unit\Storage\DatabaseTableTest\testConstruction
testConstruction()
Definition: DatabaseTableTest.php:19