3declare(strict_types=1);
19use PHPUnit\Framework\TestCase;
30 protected function setUp(): void
36 $DIC[
'ilDB'] = $this->db_mock = $this->createMock(ilDBInterface::class);
45 public function testFieldList(): void
57 protected int $id = 0;
67 protected string $string_data;
69 public function getConnectorContainerName(): string
77 $primary_field = $field_list->getPrimaryField();
78 $this->assertEquals(
'id', $primary_field->getName());
79 $this->assertEquals(8, $primary_field->getLength());
80 $this->assertEquals(
'integer', $primary_field->getFieldType());
81 $this->assertEquals(
false, $primary_field->getIndex());
82 $this->assertEquals(
true, $primary_field->getPrimary());
84 $string_field = $field_list->getFieldByName(
'string_data');
85 $this->assertEquals(
'string_data', $string_field->getName());
86 $this->assertEquals(256, $string_field->getLength());
87 $this->assertEquals(
'text', $string_field->getFieldType());
88 $this->assertEquals(
true, $string_field->getIndex());
89 $this->assertEquals(
false, $string_field->getPrimary());
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Customizing of pimple-DIC for ILIAS.
static getInstance(ActiveRecord $ar)
ILIAS DI Container $dic_backup