public function getEndpointNameProvider() { $l = EntityFactory::createFromArray('Language', ['id' => 1, 'name' => 'French']); $ug = EntityFactory::createFromArray('UserGroup', ['id' => 1, 'name' => 'UserGroup Test']); $s = EntityFactory::createFromArray('Site', ['id' => 1, 'name' => 'Example Site', 'userGroupId' => 2, 'url' => 'http://example.com', 'languageId' => 3, 'updatedAt' => '1984-06-01 07:32:23', 'isArchived' => true]); // instance, name, expected return [[$l, null, 'languages'], [$ug, null, 'usergroups'], [$s, null, 'sites'], [$s, 'customname', 'customname']]; }
public function testGetNonQualifiedClassName() { $id = 1; $name = 'Libcaca'; $ug = EntityFactory::create('UserGroup'); $ug->setId($id); $ug->setName($name); $this->assertEquals('UserGroup', $ug->getNonQualifiedClassName()); }
public function testGetNonQualifiedClassName() { $id = 1; $name = 'Libcaca'; $l = EntityFactory::create('Language'); $l->setId($id); $l->setName($name); $this->assertEquals('Language', $l->getNonQualifiedClassName()); }